We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

EE 3.4.1 - Simple Search is not working at all

How Do I?

Andy @ Pillory Barn's avatar
Andy @ Pillory Barn
130 posts
8 years ago
Andy @ Pillory Barn's avatar Andy @ Pillory Barn

I have the following simple search tag set up inside a partial in EE 3.4.1

{exp:search:simple_form form_class="header-search" where="any" search_in="everywhere" channel="static|homepage|news_resources|case_studies"}
    <input type="text" name="keywords" id="keywords" value="" placeholder="Search...">
    <input type="submit" id="search-submit" name="submit" value="">
{/exp:search:simple_form}

Now, I have also tried to use the default example from the documentation, both my own and the example one simply does not work.

I have also tried just shoving the tag somewhere on the page outside of being a partial, same problem.

When the search button is clicked, it just refreshes the page and I can’t work out what the hell is going on.

       
James Mathias's avatar
James Mathias
225 posts
8 years ago
James Mathias's avatar James Mathias

Do you have result_page https://docs.expressionengine.com/latest/add-ons/search/simple.html#id3 and no_result_page https://docs.expressionengine.com/latest/add-ons/search/simple.html#id16 templates set up?

       
Andy @ Pillory Barn's avatar
Andy @ Pillory Barn
130 posts
8 years ago
Andy @ Pillory Barn's avatar Andy @ Pillory Barn

Yeah and it still does the same thing

       
James Mathias's avatar
James Mathias
225 posts
8 years ago
James Mathias's avatar James Mathias

You need to define those in the opening simple search tag, otherwise it doesn’t know where to go.

{exp:search:simple_form form_class="header-search" where="any" search_in="everywhere" channel="static|homepage|news_resources|case_studies" result_page="path to template" no_result_page="path to template"}
        <input type="text" name="keywords" id="keywords" value="" placeholder="Search...">
        <input type="submit" id="search-submit" name="submit" value="">
    {/exp:search:simple_form}
       
Andy @ Pillory Barn's avatar
Andy @ Pillory Barn
130 posts
8 years ago
Andy @ Pillory Barn's avatar Andy @ Pillory Barn

No I mean I tried that, and had the same problem.

I’ll update the code in a second

       
James Mathias's avatar
James Mathias
225 posts
8 years ago
James Mathias's avatar James Mathias

Do you have the module installed? You can check in the add-on manager, under the first party add-ons.

       
Andy @ Pillory Barn's avatar
Andy @ Pillory Barn
130 posts
8 years ago
Andy @ Pillory Barn's avatar Andy @ Pillory Barn

Does it not ship with it? Where do I get it?

       
James Mathias's avatar
James Mathias
225 posts
8 years ago
James Mathias's avatar James Mathias

It ships with it, but it’s possible it’s not installed. You can check in the Add-On manager under first party add-ons

       
Andy @ Pillory Barn's avatar
Andy @ Pillory Barn
130 posts
8 years ago
Andy @ Pillory Barn's avatar Andy @ Pillory Barn

This is the plugin section, which one is it?

       
James Mathias's avatar
James Mathias
225 posts
8 years ago
James Mathias's avatar James Mathias

Hmm, it should be there, but I just double checked and it doesn’t seem to be listing in the add-on manager. Let me ask internally and see if we moved it or if this is a bug.

       
Andy @ Pillory Barn's avatar
Andy @ Pillory Barn
130 posts
8 years ago
Andy @ Pillory Barn's avatar Andy @ Pillory Barn

I think its a bug as I’ve used it on a 3.3.0 installation fine

       
James Mathias's avatar
James Mathias
225 posts
8 years ago
James Mathias's avatar James Mathias

I have working examples of search on 3.4.1 and 3.4.2, but also not showing the module in the add-on manager, so I’m not yet sure it’s a bug.

       
Andy @ Pillory Barn's avatar
Andy @ Pillory Barn
130 posts
8 years ago
Andy @ Pillory Barn's avatar Andy @ Pillory Barn

If it’s any help, the tags do create the CSRF hidden field etc. So something is really odd

       
Robin Sowell's avatar
Robin Sowell
13,159 posts
8 years ago
Robin Sowell's avatar Robin Sowell

I wonder if it’s losing the post data entirely, so the search tag never comes into play. I’ll see that with forms when say there’s a redirect to force www and it’s posting without it. The redirect catches it, you lose the post data in the redirect, and the page just basically refreshes.

Could that be the issue? If you’re not sure, you can link to the search and I’ll do a test and just watch what the headers are up to.

I don’t think it’s a bug in the module, but something odd is up.

       
Andy @ Pillory Barn's avatar
Andy @ Pillory Barn
130 posts
8 years ago
Andy @ Pillory Barn's avatar Andy @ Pillory Barn

Unfortunately I can’t really post the link publicly, do you have an email I can send it to? 😊

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.