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.

Zero search results displays user message despite 'no_result_page="search/no_results' parameter

October 31, 2011 10:12am

Subscribe [3]
  • #1 / Oct 31, 2011 10:12am

    ip

    80 posts

    EE 2.3.1

    {exp:search:simple_form
    channel="channel-1"
    result_page="search/results"
    no_result_page="search/no_results"
    search_in="everywhere"}

    <input type=“text” name=“keywords” id=“keywords” value=“Search” size=“18” maxlength=“100” />
    <input type=“submit” tabindex=“1” name=“search-submit” id=“search-submit” value=”” />

    {/exp:search:simple_form}

    Can anyone tell me why, when there are no results, is a User Message being displayed rather than the search/no_results template?

     

  • #2 / Nov 01, 2011 2:02am

    John Henry Donovan

    12339 posts

    Hi ip,

    Can I confirm what you mean please?
    Do you mean the native No results user message template is being displayed and not a custom template you created inside the search template group?

    If you visit the search/no_results in your browser does it render?

    Have you got a live link to where this is happening?

  • #3 / Nov 01, 2011 4:35am

    ip

    80 posts

    Hi,

    yes, that’s it, the user message template is being displayed rather than the search/no_results template.

    I’ve just pinned it down, the no_search template included a snippet that had some PHP in it. I assume that the PHP causes an error, which then displays a user message.

    I think the error message could be a bit more helpful though:
    ‘Error Search Results’!
    or is there some way to view details of errors like this?

  • #4 / Nov 03, 2011 11:17am

    Robin Sowell

    13255 posts

    Morning ip.  I’m still a little fuzzy on what’s happening and what error message is being displayed.  Can you screen cap what you’re seeing- or link to a page where I can test it out?  (I searched the code for ‘Error Search Results’ and I’m not spotting it, so think I need a clearer image of what’s going on.)

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

ExpressionEngine News!

#eecms, #events, #releases