PDA

View Full Version : Wrong URL in Geo Filtering plugin if option {Any} is selected



PGGO
December 19, 2012, 05:50 AM
When you select an option with “Any” for the second field in Geo Filter; the page returns incorrect URL, as shown below:
http://www.mysite.com/0/


Please see the snapshot in attachment to follow this step.

Viktor
December 19, 2012, 09:11 AM
Hello Kirill,

I found this error.

You should go to ftp:>>plugins>>multiField>>rlMultiField.class.php
find method: ajaxGetGeoNext

and find code in at line~1783:



$options = $empty_option = '<option value="0">'. $GLOBALS['lang']['any'] .'</option>';


and replace to:



$path = $path ? $path : 0;
$options = $empty_option = '<option value="'.$path.'">'. $GLOBALS['lang']['any'] .'</option>';

PGGO
December 19, 2012, 10:21 AM
I replaced this line of code, but it does not help resolve the problem. So I change it everything back to default.

In order to reproduce this problem, please follow these steps:
1. Select both locations
2. Click “Go” button
3. Change second location to “Any”
4. Click “Go” button
5. Here is the problem will show up.

Viktor
December 19, 2012, 11:01 AM
Hello Kirill,

You should implement this fix and 1 more: in this file in method ajaxGeoBuild at line ~1827

find:


$empty_option = '<option value="0">'. $GLOBALS['lang']['any'] .'</option>';


and replace to:



$empty_option = '<option value="'.$path1.'/">'. $GLOBALS['lang']['any'] .'</option>';


check it and let me know about results.

PGGO
December 19, 2012, 10:28 PM
The second option you provided is Working! Thank you.

The problem was resolved.

PGGO
December 24, 2012, 12:39 AM
Viktor,

I have noticed the same problem when selecting both options {Select location} in dropdown fields.

The URL path shows (0) after I click GO button.

Viktor
December 24, 2012, 03:33 AM
Hello Kirill,

Yes I found it and fix it.

Go to ftp://plugins>>multiField>>geo_block.tpl

find this code at line ~ 271



$('#geo_gobutton_dd').click(function(){
var path = $('input[name=geo_url]').val();
if( path )


and replace to:



$('#geo_gobutton_dd').click(function(){
var path = $('input[name=geo_url]').val();
if( path && path != 0 )


save and check again.