I'm trying to get a simple search form to work. But I get an error: The action you have requested is invalid.

I have no idea what I'm missing here.

Stash partial with search form:

            {exp:search:simple_form channel="blog" search_in="everywhere" result_page="blog/search"}
            <h2><label for="search">Search</label></h2>
            <div class="searchField">
                <input type="text" name="keywords" id="search" value="" size="18" maxlength="100">
                <button type="submit">Go!</button>
            </div> <!-- /.searchField -->

Stash viewmodel for search results:


{exp:stash:set name="body_class"}blog{/exp:stash:set}

{exp:stash:set_list name="detail_data" parse_tags="yes" parse_depth="2"}


        {stash:post_date}{entry_date format='%M %d, %Y'}{/stash:post_date}



This makes no difference. /TEMP/ $config['secure_forms'] = "n";

I hope someone can help me out! Thanks!

  • Do you have other problems with secure forms? For instance, can you submit comments? If you are on a corporate firewall that heavily caches URLs, your request could include an expired CSRF token. May 13, 2014 at 5:32

3 Answers 3


Newer versions of ee have more strict security requirements for post data. Try adding the following to your form:

<input type="hidden" name="XID" value="{XID_HASH}" /> 

(This is an older question but I am adding this as it a common resolution to these sorts of problems.)


Have you installed the "Search" add-on?

Had the same issue, but the search module wasn't installed.

  • Hmmm, no the search module is installed. Apr 11, 2014 at 17:59

I had a very similar issue, and it seemed to amount to the {exp:search:search_results} tag being inside a Stash tag.

So I flipped it inside out and used {exp:stash:append}(or append_list in your case) inside of the search_results tag.

  • Hmm, no. That doesn't do it either. Apr 13, 2014 at 15:01
  • Ok. One last guess. Do you have your no_result_page="" parameter set to the same template as the result_page="" parameter? Apr 14, 2014 at 0:20
  • Hmm, well. no_result_page set to the same gives me a blank page. Set to something else gives met the error again. Strange issue this one. Apr 14, 2014 at 17:22

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.