We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22840
    • 1,572 Posts
    Right,

    after some testing I seem to have it working, for some reason the &landing doesn’t function unless you add a method of POST to it, EG

    [[!SimpleSearchForm? &method=`POST` &landing=`9`]]  


    Have tried this with GET and it doesn’t return any results or take me to the landing page so I would guess that there is a issue with GET and as that is the default value of method it’s braking the basic call.

    Hope that bit of debugging helps resolve it.
      • 22840
      • 1,572 Posts
      Quick question on template’s.

      I’m trying to remove <h2>Results</h2> from the results page but can’t for the life of me find where it is, any pointers
        • 1329
        • 15 Posts
        Quote from: paulp at Jun 05, 2010, 04:37 AM

        after some testing I seem to have it working, for some reason the &landing doesn’t function unless you add a method of POST to it, EG

        [[!SimpleSearchForm? &method=`POST` &landing=`9`]]  


        Great, thank you. This does allow me to change pages, like you stated, but once it changes the page it will not display any of my search results, just the generic "There were no search results. Please try using more general terms to get more results." If I take out the "&POST" and "&landing" statements, and allow it to return the results to resource(1) it all works.

        I miss spoke. It does the above on my local install, but does work, as you said, on my server install.
        Thanks.
          • 24287
          • 14 Posts
          Hi,

          I have another problem with SimpleSearch:

          Using a custom form chunk does not work. As soon as I add the &tpl value, there won’t be any form shown any more. This is what I have:

          [[!SimpleSearchForm? &tpl=`MySearchForm`]]


          And the chunk "MySearchForm":

          <form class="sisea-search-form1" action="[[~[[+landing:default=`[[~29]]`]]]]" method="[[+method:default=`post`]]">
              <label>
                  <input type="text" name="[[+searchIndex]]" value="[[+searchValue]]" />
              </label>
          
              <input type="submit" value="[[%sisea.search? &namespace=`sisea` &topic=`default`]]" />
          </form>


          The snippet will be completely ignored. Any help will be much appreciated.
            • 28215
            • 4,149 Posts
            Hi rabimoe,

            I copied your search tpl, and the snippet call, and was unable to reproduce your problem.

            I’m guessing you have a syntax error somewhere in a call, or somewhere else on the page, or a caching error, or a typo in one of the names of the snippet or chunk.
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
              • 1778
              • 659 Posts
              Hello all

              I have the same problem with landing and no results... Same behavior on local install or on my live server...

              http://modxcms.com/forums/index.php/topic,50666.0.html

              I tried

              • WITH and WITHOUT custom templates, both works fine if simpleSearchForm and simpleSearch are called on the same page with no landing..., if landing specified redirects on the results page but with "no result found"
              • WITH method=`POST`, with &method=`post`, with &method=`GET`, with &method=`get`, always the same result all is fine if calls are on the same page, if &landing is specified, redirects on the good page but with "no results"
              .

              So, it’s not a problem with templates (the issue is the same, with or without custom templates), seems not to be a problem with the "redirect" (the redirection works fine), in the url the REQUEST is the good one...

              Any clue ?
              Thanks
                • 1778
                • 659 Posts
                Hello all,

                I have solved my landing problem (see previous posts) ! It was not a problem with the "&method=`GET` or `POST` " (it works well with both)...

                The problem is with the landing page : it must be UNCACHEABLE (page settings -> uncheck the cacheable option) and the &landing works fine !

                Another issue I have found (and not solved yet) is a problem with &paging...

                I call SimpleSearch in my results page with this call :
                [[!SimpleSearch? &perPage=`5`]]
                


                I have ten results for my search request, so the "results pages" is 2, and is well displayed in the [[+paging]] placeholder, the problem is the first page displays all 10 results not only the first five. I expected to have the first five results on the first results page, the five next on the 2nd page, etc...
                If I click on the second page, these one has its 5 results as expected...

                Am I missing something ?

                Thanks for help


                  • 28215
                  • 4,149 Posts
                  Could you file that as a bug here:

                  http://github.com/splittingred/SimpleSearch/issues

                  Thanks!
                    shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                    • 1778
                    • 659 Posts
                    Done, issue #4, with title "problem with paging"
                    Cheers
                      • 3109 ☆ A M B ☆
                      • 894 Posts
                      Does anyone know how to change the text value of the search button from search to Go or something else?

                      Thanks.

                      [UPDATE]

                      I manged to fix this by creating a new chunk as a template and modified this code:

                      
                      
                      <form class="sisea-search-form" action="[[~[[+landing:default=`[[*id]]`]]]]" method="[[+method:default=`get`]]">
                          <label>
                              <input type="text" name="[[+searchIndex]]" value="[[+searchValue]]" />
                          </label>
                      
                         <input type="submit" value="[[%sisea.search? &namespace=`sisea` &topic=`default`]]" />
                      </form>
                      
                      


                      To this:

                      
                      
                      <form class="sisea-search-form" action="[[~[[+landing:default=`[[*id]]`]]]]" method="[[+method:default=`get`]]">
                          <label>
                              <input type="text" name="[[+searchIndex]]" value="[[+searchValue]]" />
                          </label>
                      
                         <input type="submit" value="Go" method="[[%sisea.search? &namespace=`sisea` &topic=`default`]]" />
                      </form>
                      
                      


                      I don’t know if this is the correct method of doing this but the search works and the button has the label I want.

                      If someone knows the proper way to do this please let me know.

                      Thanks.
                        Benjamin Marte
                        Interactive Media Developer
                        Follow Me on Twitter | Visit my site | Learn MODX