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

Search setup using simple_form on submit just goes to my site’s home page

Development and Programming

Brandon Jones's avatar
Brandon Jones
5,500 posts
14 years ago
Brandon Jones's avatar Brandon Jones

Hi Tom,

The Search Module does not directly POST to your results page. It is designed to POST to EE’s index.php, which routes the request to the appropriate module and method via the ACT parameter (see the action_ids found in your exp_actions table). The module does its thing (in this case, takes the POST data, does a search and stores a result in the database) and only then redirects you to your results page, where the search_results tag will fetch the appropriate result from the database.

An example of action_id in action can be found in our Module Development Tutorial.

There are probably a few ways to hack around this, but they’d be outside the scope of support we can offer. In the long run, I think the best approach would be to try to get your site using EE more natively. You could still use the Query Module to run SQL in your templates, so doing a bare-minimum port of your custom index.php to a real EE template may not be a big deal. In any case, hope this helps clarify and get you on the right track!

       
TomT's avatar
TomT
49 posts
14 years ago
TomT's avatar TomT

Ugh, my home page is highly complex. Just so I have it straight, you can only use EE’s search functionality if your index page is generated by EE? That doesn’t sound right.

I was going to try detecting if the post variables are set and then resubmitting them via PHP or something to the search/results page but it sounds like that wouldn’t even work correct?

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
14 years ago
Sue Crocker's avatar Sue Crocker

Hi, Tom. Since this is beyond the scope of normal EE support, I’m moving this over to the Development and Programming forum.

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
14 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

Hey Tom,

What is it about your home page that made you choose to not use EE’s index.php file? As Brandon indicated, EE handles URLs in a number of ways which requires the routing code in /index.php.

Have you considered using EE’s index.php file and using an EE template with PHP enabled for your site’s custom home page code? This approach would make it easier to use and support EE’s core functionality out of the box (including some 3rd party add-ons as well)

Regards, Erik

       
TomT's avatar
TomT
49 posts
14 years ago
TomT's avatar TomT

Erik,

My site had been up and running for years before I added EE functionality to it. I just want EE to handle the articles and reviews section and nothing else. EE is an addition to my site, not the site itself.

I’m surprised that my setup seems so uncommon that something like this hasn’t come up elsewhere (or who knows maybe it has).

Unless I find a hack-around I’m probably going to have to write my own search results module as I really don’t want to port over my home page to EE.

Tom

       
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.