I am trying to get a custom no search result page working and all I keep getting is the standar white background/ gray box with the text,

Search Results:
Your search did not return any results.
Return to Previous Page

My code for my simple search form is as follows:

<div class="search_box search_results_page">
                {exp:search:simple_form channel="recipes" id="recipe_search" result_page="recipes/search-result"  no_result_page="recipes/no-results" }
                    <span class="search_box_content">
                        <label for="keywords">Search:</label> 
                        <input type="text" name="keywords" id="keywords" class="clear_default" value="Search for a recipe" size="18" maxlength="100">
                        <input id="recipe_submit" type="submit" value="" class="submit">

The template DOES exist and lives in the same template.group as the search template.

I have also looked at this thread: Simple Search returns System Message template for No Results even when 'no_result_page' set

But that doesn't seem to have helped me either, I get an error:

Fatal error: Call to undefined function ee() in /home/sites/justmilk.com/public_html/dev.justmilk.com/jmadmin/expressionengine/modules/search/mod.search.php on line 1262

I am fairly new to EE so any ideas hints tips would be appreciated.

  • What version of EE are you running?
    – Alex Kendrick
    Apr 15, 2014 at 18:52
  • 1
    It is an older version, 2.3.1. We want to update the system but finding time to upgrade and test is proving difficult at present. We just need a fix until such a time can be set aside to upgrade the site.
    – DLaverick
    Apr 16, 2014 at 10:03
  • In that case you need to use $this->EE instead of ee() when trying the bug fix from the bug tracker. I added an answer -- hope it helps!
    – Alex Kendrick
    Apr 16, 2014 at 13:54

1 Answer 1


My No Results Page had this code, which is incorrect:


    <p>We have been unable to find any results for '{exp:search:keywords}'</p> 


I found the answer I was looking for here:


By using this code:

Sorry, there are no results for '{exp:search:keywords} {exp:search:keywords} {/exp:search:keywords}'

This fixed the error. All that is left to do is clean up my template.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.