We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36122
    • 6 Posts
    Greetings all,
    I am a new user of Modx and am enjoying it so far, however a client has a problem with a section of their website. The Search Function in the header does not return any search results, instead it redirects to another version of the home page but with missing content.

    The website (www.ccpscotland.org) has 3 sections to it (in a sub navigation to the right hand side, below the main navigation), Coalition of Care and Support Providers in Scotland - CCPS, Providers and Personalisation - P&P, and Housing Support Enabling Unit (HSEU).
    The search function works fine in P&P and HSEU but not in CCPS (which is the index file).

    I have tried in both the front end and via Manager and get the same results in both. I've searched all files for a difference but I cannot see anything out of place.

    Using MODx version 0.9.6.3 (rev 4565) and AjaxSearch version 1.8.1

    Any help on this would be greatly appreciated. Go easy though guys, I am a total newbie when it comes to MODx. laugh

    C
      SystemWise
      • 36122
      • 6 Posts
      Can anyone help with this issue please ?
        SystemWise
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Are the sections using different templates? It looks to me like the search snippet's landing page is set to the wrong resource ID for the first section.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 36122
          • 6 Posts
          Hi Sottwell, thank you very much for your reply. yes the sections are using different templates.

          Page Templates:
          CCPS Home Page (7) - CCPS Landing Page Template
          Content Page (2 column) (11) - Standard Content Page Template With 2 Columns
          Content Page (3 column) (1) - Standard Content Page Template With 3 Columns
          HSEU Home Page (9) - HSEU Landing Page Template
          PP Home Page (13) - PP Landing Page Template
          VSSSWU Home Page (8) - VSSSWU Landing Page Template

          Do you know where I would be able to check the resource ID's are set correctly?

          Thanks

          SW
            SystemWise
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Look for the AjaxSearch snippet tags, and make sure the &landingPage property is set to the correct resource ID for the search results page.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 36122
              • 6 Posts
              Hi Susan,

              Thank you for your assistance, I'm getting there... ....slowly! smiley

              I have found that the home page search is pointing to "http://www.ccpscotland.org/index.php?id=8" which is the same as the search ID , i think?

              I have attached a screenshot showing the AS_landing page set to '8'. It is this thats causing the problem you think?



              Home Page
              [!AjaxSearch? &AS_showForm=`0` &ajaxSearch=`0` &AS_landing=`8` &moreResultsPage=`8` &showMoreResults=`1` &addJscript=`0` &extract=`1` &parents=`1` &advSearch=`allwords`!]

              PP
              [!AjaxSearch? &AS_showForm=`0` &ajaxSearch=`0` &AS_landing=`606` &moreResultsPage=`606` &showMoreResults=`1` &addJscript=`0` &extract=`1` &parents=`67` &advSearch=`allwords`!]

              Thanks

              Chris
                SystemWise
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Well, what page should the search go to? The search landing page also has to have an AjaxSearch snippet on it, to process the search form submission.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 36122
                  • 6 Posts
                  Hi Susan,
                  I found it!! laugh
                  Thanks for your help.
                  The problem was the Search Results page was set to use the wrong template. As soon as I changed the template to be the Content Page (3 column) instead of the home page template it worked!
                  Thanks
                  C
                    SystemWise