ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Simple and advanced search forms always resulting in no results at all

April 17, 2011 1:15pm

Subscribe [7]
  • #16 / Aug 30, 2011 11:40pm

    Dan Decker

    7338 posts

    MH1985,

    In having a look at this, I went straight to your search/index template, without performing a search, and it results in a PHP error:

    Parse error: syntax error, unexpected '{' in /var/www/vhosts/yoursite.com/subdomains/new/httpdocs/[redacted]/expressionengine/libraries/Functions.php(656) : eval()'d code on line 61

    So you might investigate that.

    Cheers,

  • #17 / Aug 31, 2011 1:07am

    Dan Decker

    7338 posts

    MH1895,

    Great news, for now, I have search working on your site. Here is the run down of what led to this.
    In exp_template_groups there were multiple template groups named “search” associated with site_id 1, you main site in an MSM installation. Prior to doing anything, I saved your search group templates to a backup. I then removed any template groups related to search in any way. I renamed your “search” group to “search-hogeboom” to avoid any conflicts. All of your original search templates are in this group.

    If you do a search, your results are displayed using search-hogeboom/results. The reason the “result_page=search-hogeboom/index” will 404 has to do with strict URLs. EE was pointing just to “/search” in your original setup, with the reference to the cached search results, so “/search/51b8c88dde9d67552cceb5f25f370bcb” which, strictly speaking, would not be a valid URL and should 404. Whereas, “/search/index/51b8c88dde9d67552cceb5f25f370bcb” *would* have shown results. “No Results” is also working properly.

    Let us know if you have any further questions, or need any further assistance.

    Cheers,

  • #18 / Aug 31, 2011 6:52am

    Maik Hoogkamer

    36 posts

    MH1895,

    Great news, for now, I have search working on your site. Here is the run down of what led to this.
    In exp_template_groups there were multiple template groups named “search” associated with site_id 1, you main site in an MSM installation. Prior to doing anything, I saved your search group templates to a backup. I then removed any template groups related to search in any way. I renamed your “search” group to “search-hogeboom” to avoid any conflicts. All of your original search templates are in this group.

    If you do a search, your results are displayed using search-hogeboom/results. The reason the “result_page=search-hogeboom/index” will 404 has to do with strict URLs. EE was pointing just to “/search” in your original setup, with the reference to the cached search results, so “/search/51b8c88dde9d67552cceb5f25f370bcb” which, strictly speaking, would not be a valid URL and should 404. Whereas, “/search/index/51b8c88dde9d67552cceb5f25f370bcb” *would* have shown results. “No Results” is also working properly.

    Let us know if you have any further questions, or need any further assistance.

    Cheers,

    Hi Dan, thank you very much for looking into this. I see it’s working now indeed!
    What caused the duplicate template groups though is a mystery to me, as are the duplicate templates within the groups.

    I’ve also tried /search/index/[string] but it wouldn’t work for me back then (probably had to do with the duplicate template groups / templates).

    The errors probably have to do with the PHP parsing.

    I’ll have a closer look and come back at it, thanks for now!

  • #19 / Aug 31, 2011 8:12am

    Dan Decker

    7338 posts

    MH1985,

    I found a clue about the PHP errors… the templates that had PHP in them had “Allow PHP?” set to “No”. I switched that on, and everything seemed right as rain.

    My theory about the “never-ending clones” is that is has something to do with template groups of the same name in other sites in MSM. Now that shouldn’t matter, but it may very well be a bug. The only problem is, the step to repeat it were seemingly random.

    Cheers,

  • #20 / Aug 31, 2011 8:16am

    Maik Hoogkamer

    36 posts

    MH1985,

    I found a clue about the PHP errors… the templates that had PHP in them had “Allow PHP?” set to “No”. I switched that on, and everything seemed right as rain.

    My theory about the “never-ending clones” is that is has something to do with template groups of the same name in other sites in MSM. Now that shouldn’t matter, but it may very well be a bug. The only problem is, the step to repeat it were seemingly random.

    Cheers,

    Yep, all is working again now. It was the PHP settings that messed the page up, just as I thought. I will keep an eye on the template group behavior and will post a bug report if needed.

    For now however, my problem is solved 😊

  • #21 / Aug 31, 2011 8:21am

    Dan Decker

    7338 posts

    Michiel,

    As the original poster on this thread, I’m checking in on you to see your status Were you ever able to get search working in any fashion? Please update us on where you are, we want to get your situation resolved as well, but you went quiet as this thread progressed.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases