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

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:

Please see the snapshot in attachment to follow this step.

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>';

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.

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


$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.

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

The problem was resolved.

December 24, 2012, 12:39 AM

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.

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

var path = $('input[name=geo_url]').val();
if( path )

and replace to:

var path = $('input[name=geo_url]').val();
if( path && path != 0 )

save and check again.