I have this exact same issue. I have 1400 locations to manage, so navigating to each individual page to make the change is a pain.
When I have more time this afternoon I’ll try to poke into the code to diagnose, but for now, consider this a “CONFIRMED”.
Running WordPress 3.5.1
StoreLocator Plus Version 3.8.12 with ProPack
I have found and produced a fix for this issue. Here’s the diff if you want to edit the code yourself:
diff -rupN include_old/slp-adminui_managelocations_class.php include/slp-adminui_managelocations_class.php
--- include_old/slp-adminui_managelocations_class.php 2013-01-31 15:39:35.000000000 -0800
+++ include/slp-adminui_managelocations_class.php 2013-01-31 15:42:53.000000000 -0800
@@ -556,13 +556,16 @@ if (! class_exists('SLPlus_AdminUI_Manag
__("View", SLPLUS_PREFIX)."</a>" :
"" ;
+ $editlink = str_replace('&edit='.(isset($_GET['edit'])?$_GET['edit']:''), '', $_SERVER['REQUEST_URI']);
+ $editlink = str_replace('&q='.$qry, '', $editlink);
+ $editlink .= '&edit='.$locID.(!empty($qry) ? '&q='.urlencode($qry) : '').'#a'.$locID;
+
print
"<tr style='background-color:$bgcol'>" .
"<th><input type='checkbox' name='sl_id[]' value='$locID'></th>" .
"<th class='thnowrap'>".
"<a class='action_icon edit_icon' alt='".__('edit',SLPLUS_PREFIX)."' title='".__('edit',SLPLUS_PREFIX)."'
- href='".preg_replace('/&edit='.(isset($_GET['edit'])?$_GET['edit']:'').'/', '',$_SERVER['REQUEST_URI']).
- "&edit=" . $locID ."#a$locID'></a>".
+ href='".$editlink."'></a>".
" " .
"<a class='action_icon delete_icon' alt='".__('delete',SLPLUS_PREFIX)."' title='".__('delete',SLPLUS_PREFIX)."'
href='".$_SERVER['REQUEST_URI']."&delete=$locID' " .
diff -rupN include_old/storelocatorplus-adminui_class.php include/storelocatorplus-adminui_class.php
--- include_old/storelocatorplus-adminui_class.php 2013-01-31 15:39:35.000000000 -0800
+++ include/storelocatorplus-adminui_class.php 2013-01-31 15:42:55.000000000 -0800
@@ -561,7 +561,7 @@ if (! class_exists('SLPlus_AdminUI')) {
$prev = min(max(0,$start-$num_per_page),$totalLocations);
$next = min(max(0,$start+$num_per_page),$totalLocations);
$qry = isset($_GET['q'])?$_GET['q']:'';
- $cleared=preg_replace('/q=$qry/', '', $_SERVER['REQUEST_URI']);
+ $cleared=preg_replace('/&q=[^&]*/', '', $_SERVER['REQUEST_URI']);
$extra_text=(trim($qry)!='') ?
__("for your search of", SLPLUS_PREFIX).
A safe way to apply this is to make sure you’re running the latest version of the plugin first (3.8.12), then switch into the wp-content/plugins/store-locator-le directory, copy and paste the above code into a file in that directory called changes.diff and then run the following command:
patch -p0 < changes.diff
There is a patch I am testing with 3.8.13 that is more extensive. The problem goes beyond edit and to the basic manner in which URLs are constructed in the manage locations module. I spent a good bit of time cleaning that up in the 3.8.13 build, though still not perfect it is a big step in the right direction.
I hope to finish testing 3.8.13 soon. If anyone wants a pre-release copy you can fetch it here, but be warned I’ve not tested it yet other than on my development system:
http://www.charlestonsw.com/?attachment_id=7221
Thanks for the reply! I just handed off my project that I was working on, bit I appreciate the download link. Glad to hear something is in the works. I did notice there’s a few edge cases as well, beyond what I reported, such as trying to edit an entry after searching for un-geocoded results.
Thanks again for reply and the product you offer.
Thread Starter
Anonymous User
(@anonymized-10791357)
Your latest update fixed it. Thank you!!!