Psytanium Posted April 24, 2017 Share Posted April 24, 2017 Hi, When i open my website on any browser and search for anything, the page load then redirect me to the home page. This is happening only for the 1st search, a second search work fine. This problem was solved by removing tep_hide_session_id() from the cm_search.php module. I don't know what's the job of tep_hide_session_id(), what's the side effect of removing it ? Thank you Link to comment Share on other sites More sharing options...
Solomono Posted April 29, 2017 Share Posted April 29, 2017 Hi, you can delete it, this function is not necessary now. //// // Hide form elements function tep_hide_session_id() { $string = ''; if (defined('SID') && tep_not_null(SID)) { $string = tep_draw_hidden_field(tep_session_name(), tep_session_id()); } return $string; } Link to comment Share on other sites More sharing options...
♥kymation Posted April 29, 2017 Share Posted April 29, 2017 @@Solomono This is wrong. Removing this function will cause loss of session, resulting in lost carts etc. Do not do this. If your problem is solved by disabling this function, you have a sessions problem. The most common cause is an incorrect setting in the includes/copnfigure.php. Search this forum for suggested fixes. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Solomono Posted April 29, 2017 Share Posted April 29, 2017 @@kymation I`ve delete this wrong function many years ago and all if fine, my clients are happy ;) Link to comment Share on other sites More sharing options...
♥kymation Posted April 29, 2017 Share Posted April 29, 2017 @@Solomono You can lose as much business as you want through faulty coding, just don't advise other people to make the same mistake. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Solomono Posted April 29, 2017 Share Posted April 29, 2017 @@kymation can you answer, what will be "mistake" when he`ll delete tep_hide_session_id() from cm_search.php ? Link to comment Share on other sites More sharing options...
♥kymation Posted April 30, 2017 Share Posted April 30, 2017 The tep_hide_session_id() function is part of osCommerce's session management. It passes a session token in form submissions. The tep_href_link() function performs the same session management for links. Both of those are needed to maintain session before the session cookie is first returned and when the customer's browser does not manage cookies correctly. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Dennisra Posted September 12, 2017 Share Posted September 12, 2017 Apparently the answer given is not the correct solution to this problem. So what is correct? I have the same problem. On 4/24/2017 at 5:39 AM, Psytanium said: When i open my website on any browser and search for anything, the page load then redirect me to the home page. This is happening only for the 1st search, a second search work fine. This problem was solved by removing tep_hide_session_id() from the cm_search.php module. Link to comment Share on other sites More sharing options...
burt Posted September 12, 2017 Share Posted September 12, 2017 This appears to be becoming a common problem. I have just been working with a client who experiences this same problem, however I could not replicate the problem in any browser... As I could not replicate it, I could not fix it. Should anyone have the same or similar problem...and has fixed it (for certain), please post back. Thanks In my clients case session management is correct htaccess is not interfering first search does nothing, from then on it works perfectly. Link to comment Share on other sites More sharing options...
Psytanium Posted September 14, 2017 Author Share Posted September 14, 2017 @burt i can put back tep_hide_session_id() from in cm_search.php and give you access to replicate the problem. if you want. Link to comment Share on other sites More sharing options...
Psytanium Posted September 14, 2017 Author Share Posted September 14, 2017 On 9/12/2017 at 11:32 PM, wHiTeHaT said: What oscommerce version ? Stock (default) or bootstrap version? From where is been searched? -From the header (bootstrap version)? -From the searchbox? -From the advanced_search page? 2.3.4, this problem appear on your 1st search from any page, not only advanced search page. Link to comment Share on other sites More sharing options...
Dennisra Posted September 14, 2017 Share Posted September 14, 2017 Private message sent to: wHiTeHaT Link to comment Share on other sites More sharing options...
Dennisra Posted September 14, 2017 Share Posted September 14, 2017 I reset settings in Chrome per wHiTeHaT and it works correctly now. Many thanks! Link to comment Share on other sites More sharing options...
Psytanium Posted September 17, 2017 Author Share Posted September 17, 2017 I turned back the tep_hide_session_id() to cm_search.php module. Now it's searching well, I don't know what was the problem. But I'm sure it was happening on different computers and browsers, The store owners received many reports from users about it. Anyway now we are fine. Thanks all Link to comment Share on other sites More sharing options...
Psytanium Posted October 3, 2017 Author Share Posted October 3, 2017 I'm still getting the problem after i put back the tep_hide_session_id() in cm_search.php module. if someone want to try search woodandgas.com Link to comment Share on other sites More sharing options...
Psytanium Posted October 3, 2017 Author Share Posted October 3, 2017 4 hours ago, Psytanium said: I'm still getting the problem after i put back the tep_hide_session_id() in cm_search.php module. if someone want to try search woodandgas.com @wHiTeHaT Link to comment Share on other sites More sharing options...
burt Posted October 4, 2017 Share Posted October 4, 2017 6 minutes ago, wHiTeHaT said: I got same problem on first search on wood&gas. Second search worked, then i was not able to replicate the bug anymore. Even when i removed stored sessions and cookies. (chrome browser) So i tested after in Edge, used same search-word and it instantly worked. Conclusion.... no idea! Exact same problem on a number of sites. My conclusion was SEO URL rewriting interfering, but that was a total guess and have not had a chance to try it with SEO Urls turned off. Link to comment Share on other sites More sharing options...
burt Posted October 4, 2017 Share Posted October 4, 2017 On woodandgas, for me it now works perfect everytime. It's so hard to get to the bottom of something when the problem is intermittent.. :( Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.