Joomla JEA forms don’t send when you come from a search page.


I recently had an email asking how I removed the ?task=search from the url of the joomla estate agency component.

I originally removed the ?task=search query string as it prevents people from emailing the url of a property to a friend. When the url is visited by another user it will show a session has ended message and direct you to a search page, and the friend will have no idea what you were trying to send them.

 

Here is the reply that I sent them.

 

Open up the file:

modules/mod_jea_search/tmpl/default.php

search for the line:

<input type="hidden" name="task" value="search" />


and change it to this

<!--<input type="hidden" name="task" value="search" />-->


That should sort out the module. The component search I think is in:

components/com_jea/controllers/properties.php

look for

if( ( JRequest::getVar( 'task' ) != 'search' ) &&  ( isset( $_SESSION['jea_search'] ) ) ) {
unset( $_SESSION['jea_search'] );
}


and comment out like this:

/*    if( ( JRequest::getVar( 'task' ) != 'search' ) &&  ( isset( $_SESSION['jea_search'] ) ) ) {
unset( $_SESSION['jea_search'] );
}
*/


If it doesn't work just uncomment everything to put it back to how it was.

These files change with each version so it depends which one you're using as to how the code will look.