Welcome, Guest
Username: Password: Remember me

TOPIC: Search Module Bug with solution

Search Module Bug with solution 2 years 3 weeks ago #4411

  • Matt Wilmshorst
  • Matt Wilmshorst's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 2
  • Karma: 0
The Search Module is using get vs post and creates a problem with the SEO components like SEF404.

FIXED WITH :

Changed the search form method to post
<form action="/index.php?option=com_jomclassifieds&amp;view=search&amp;Itemid=147" method="[color=#bb0000]post[/color]" name="jcsSearchForm" class="form-vertical" id="jcsSearchForm" enctype="multipart/form-data">

Then in the model search.php

Around line 49 change : $this->search = JRequest::getVar('search', '', 'get', 'string'); to $this->search = JRequest::getVar('search', '', 'post', 'string');

AND just below around Line 78 change :
$get = JRequest::get('get'); to $get = JRequest::get('post');

Now the search function works right without messing the sef urls up and not putting a bunch of code vars in the URL
The administrator has disabled public write access.

Search Module Bug with solution 2 years 2 weeks ago #4418

  • Super User
  • Super User's Avatar
  • Offline
  • Administrator
  • Posts: 2765
  • Thank you received: 292
  • Karma: 40
Thanks for your effort. But if you use POST, the users cannot bookmark their search results. This is the reason why we used GET.

Thanks.
The administrator has disabled public write access.
Time to create page: 0.184 seconds