vanchuck
Forum Replies Created
-
Forum: Plugins
In reply to: [Store Locator Plus®] Search/edit problem in adminThanks 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.
Forum: Plugins
In reply to: [Store Locator Plus®] Search/edit problem in adminI 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-ledirectory, copy and paste the above code into a file in that directory calledchanges.diffand then run the following command:patch -p0 < changes.diffForum: Plugins
In reply to: [Store Locator Plus®] Search/edit problem in adminI 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