The issue was in Dashboard where the AJAX mode was being forced to ‘load’ (initial look) all the time and ignoring the search mode.
Also SLP was flipping logic of search and load limits with search pulling the initial limit and load pulling the after search limit.
Resolved in Dashboard 2303.05.01 and SLP 2303.05.01
Concur > Cici
Customer Report from (cvtsoft : 834.832)

Research
User Settings
- Settings
- Results
- At Startup
- Show Locations : 1
- Initial Search Radius : <empty>
- Number To Show Initially : 25
- Changed this to 5 for testing
- After Search
- Number To Show : 25
- At Startup
- Results
Interaction : Generate Embed
Initial Query
/**/
initMySLP({
"data": {
"success": true,
"slp_version": "2503.03.01",
"data_queries": {
"standard_location_load":
{
"query_slugs": ["selectall_initial_distance", "where_default_validlatlong"],
"query": "SELECT *, sl_initial_distance AS sl_distance FROM wp_832_store_locator LEFT JOIN wp_832_slp_extendo USING(sl_id) WHERE sl_latitude REGEXP '^[0-9]|-' AND sl_longitude REGEXP '^[0-9]|-' AND ( NOT sl_private OR sl_private IS NULL) ORDER BY sl_distance asc,sl_initial_distance asc LIMIT 5",
"params": ["5"],
"locations": {
"pre-filter": 5,
"filtered": 5
}
}
},
"count": 5,
"type": "load",
"http_query": {
"callback": "initMySLP",
"action": "csl_ajax_onload",
"address": "",
"formdata": "nameSearch=&addressInput=&addressInputCity=&addressInputState=&addressInputCountry=&ignore_radius=0",
"lat": "37.09024",
"lng": "-95.712891",
"options": {
"map_center_lat": "37.09024000",
"map_center_lng": "-95.71289100",
"city": "",
"country": "",
"distance_unit": "miles",
"ignore_radius": "0",
"initial_radius": "",
"map_domain": "maps.google.com",
"map_end_icon": "https:\/\/local.storelocatorplus.com\/john_at_cvtsoftserve_dot_com\/wp-content\/mu-plugins\/store-locator-plus\/images\/icons\/bulb_azure.png",
"state": "",
"territory": ""
},
"radius": "",
"nonce": "d47fb592a4",
"api_key": "myslp.e0db54d191521ffc7b7908019919af0340185260666a814397a7ecde7dedab66",
"_jsonp": "initMySLP",
"_": "1741189345116"
},
"response": [{
Search 90013
/**/
initMySLP({
"data": {
"success": true,
"slp_version": "2503.03.01",
"data_queries": {
"standard_location_search":
{
"query_slugs": ["selectall_with_distance", "where_default_validlatlong"],
"query": "SELECT *,( 3959 * acos( cos( radians( 34.043925 ) ) * cos( radians( sl_latitude ) ) * cos( radians( sl_longitude ) - radians( -118.242429 ) ) + sin( radians( 34.043925 ) ) * sin( radians( sl_latitude ) ) ) ) AS sl_distance FROM wp_832_store_locator LEFT JOIN wp_832_slp_extendo USING(sl_id) WHERE sl_latitude REGEXP '^[0-9]|-' AND sl_longitude REGEXP '^[0-9]|-' AND ( NOT sl_private OR sl_private IS NULL) HAVING (sl_distance < 200.000000) OR (sl_distance IS NULL) ORDER BY sl_distance asc LIMIT 5",
"params": [3959, "34.043925", "-118.242429", "34.043925", "200", "5"],
"locations": {
"pre-filter": 5,
"filtered": 5
}
}
},
"count": 5,
"type": "load",
"http_query": {
"callback": "initMySLP",
"action": "csl_ajax_search",
"address": "90013",
"formdata": "nameSearch=&addressInput=90013&addressInputCity=&addressInputState=&addressInputCountry=&ignore_radius=0",
"lat": "34.043925",
"lng": "-118.242429",
"options": {
"map_center_lat": "37.09024000",
"map_center_lng": "-95.71289100",
"city": "",
"country": "",
"distance_unit": "miles",
"ignore_radius": "0",
"initial_radius": "",
"map_domain": "maps.google.com",
"map_end_icon": "https:\/\/local.storelocatorplus.com\/john_at_cvtsoftserve_dot_com\/wp-content\/mu-plugins\/store-locator-plus\/images\/icons\/bulb_azure.png",
"state": "",
"territory": ""
},
"radius": "200",
"nonce": "d47fb592a4",
"api_key": "myslp.e0db54d191521ffc7b7908019919af0340185260666a814397a7ecde7dedab66",
"_jsonp": "initMySLP",
"_": "1741189345117"
},
"response": [{
Dev Notes
Search : 90013
Call Stack
SLP_AJAX.php:309, SLP_AJAX->find_locations()
MySLP_REST_API.php:753, MySLP_REST_API->get_map_locations()
MySLP_REST_API.php:377, MySLP_REST_API->get_search_locations()
MySLP_REST_API.php:296, MySLP_REST_API->search_map()
MySLP.php:265, MySLP->rest_dispatch_request_filter()
class-wp-hook.php:324, WP_Hook->apply_filters()
plugin.php:205, apply_filters()
class-wp-rest-server.php:1187, WP_REST_Server->respond_to_request()
class-wp-rest-server.php:1041, WP_REST_Server->dispatch()
class-wp-rest-server.php:431, WP_REST_Server->serve_request()
rest-api.php:424, rest_api_loaded()
class-wp-hook.php:324, WP_Hook->apply_filters()
class-wp-hook.php:348, WP_Hook->do_action()
plugin.php:565, do_action_ref_array()
class-wp.php:418, WP->parse_request()
class-wp.php:813, WP->main()
functions.php:1336, wp()
wp-blog-header.php:16, require()
index.php:17, {main}()

Pass to SQL builder, stack:
SLP_Data.php:483, SLP_Data->get_SQL()
SLP_AJAX.php:178, SLP_AJAX->execute_location_query()
SLP_AJAX.php:330, SLP_AJAX->find_locations()
MySLP_REST_API.php:753, MySLP_REST_API->get_map_locations()
MySLP_REST_API.php:377, MySLP_REST_API->get_search_locations()
MySLP_REST_API.php:296, MySLP_REST_API->search_map()
MySLP.php:265, MySLP->rest_dispatch_request_filter()
class-wp-hook.php:324, WP_Hook->apply_filters()
plugin.php:205, apply_filters()
class-wp-rest-server.php:1187, WP_REST_Server->respond_to_request()
class-wp-rest-server.php:1041, WP_REST_Server->dispatch()
class-wp-rest-server.php:431, WP_REST_Server->serve_request()
rest-api.php:424, rest_api_loaded()
class-wp-hook.php:324, WP_Hook->apply_filters()
class-wp-hook.php:348, WP_Hook->do_action()
plugin.php:565, do_action_ref_array()
class-wp.php:418, WP->parse_request()
class-wp.php:813, WP->main()
functions.php:1336, wp()
wp-blog-header.php:16, require()
index.php:17, {main}()
Returns SQL statement:
SELECT *,( %d * acos( cos( radians( %f ) ) * cos( radians( sl_latitude ) ) * cos( radians( sl_longitude ) - radians( %f ) ) + sin( radians( %f ) ) * sin( radians( sl_latitude ) ) ) ) AS sl_distance FROM wp_832_store_locator LEFT JOIN wp_832_slp_extendo USING(sl_id) WHERE sl_latitude REGEXP '^[0-9]|-' AND sl_longitude REGEXP '^[0-9]|-' AND ( NOT sl_private OR sl_private IS NULL)
Back to execute_location_query()
SLP_AJAX.php:192, SLP_AJAX->execute_location_query()
SLP_AJAX.php:330, SLP_AJAX->find_locations()
MySLP_REST_API.php:753, MySLP_REST_API->get_map_locations()
MySLP_REST_API.php:377, MySLP_REST_API->get_search_locations()
MySLP_REST_API.php:296, MySLP_REST_API->search_map()
MySLP.php:265, MySLP->rest_dispatch_request_filter()
class-wp-hook.php:324, WP_Hook->apply_filters()
plugin.php:205, apply_filters()
class-wp-rest-server.php:1187, WP_REST_Server->respond_to_request()
class-wp-rest-server.php:1041, WP_REST_Server->dispatch()
class-wp-rest-server.php:431, WP_REST_Server->serve_request()
rest-api.php:424, rest_api_loaded()
class-wp-hook.php:324, WP_Hook->apply_filters()
class-wp-hook.php:348, WP_Hook->do_action()
plugin.php:565, do_action_ref_array()
class-wp.php:418, WP->parse_request()
class-wp.php:813, WP->main()
functions.php:1336, wp()
wp-blog-header.php:16, require()
index.php:17, {main}()
Which adds the extra params like limit to the SQL query:
SELECT *,( %d * acos( cos( radians( %f ) ) * cos( radians( sl_latitude ) ) * cos( radians( sl_longitude ) - radians( %f ) ) + sin( radians( %f ) ) * sin( radians( sl_latitude ) ) ) ) AS sl_distance FROM wp_832_store_locator LEFT JOIN wp_832_slp_extendo USING(sl_id) WHERE sl_latitude REGEXP '^[0-9]|-' AND sl_longitude REGEXP '^[0-9]|-' AND ( NOT sl_private OR sl_private IS NULL) HAVING (sl_distance < %f) OR (sl_distance IS NULL) ORDER BY sl_distance asc LIMIT %d
The AJAX object query_params at this stage:
Array
(
[callback] => initMySLP
[action] => csl_ajax_search
[address] => 90013
[formdata] => nameSearch=&addressInput=90013&addressInputCity=&addressInputState=&addressInputCountry=&ignore_radius=0
[lat] => 34.043925
[lng] => -118.242429
[options] => Array
(
[map_center_lat] => 37.09024000
[map_center_lng] => -95.71289100
[city] =>
[country] =>
[distance_unit] => miles
[ignore_radius] => 0
[initial_radius] =>
[map_domain] => maps.google.com
[map_end_icon] => https://local.storelocatorplus.com/john_at_cvtsoftserve_dot_com/wp-content/mu-plugins/store-locator-plus/images/icons/bulb_azure.png
[state] =>
[territory] =>
)
[radius] => 200
[nonce] => d47fb592a4
[api_key] => myslp.e0db54d191521ffc7b7908019919af0340185260666a814397a7ecde7dedab66
[_jsonp] => initMySLP
[_] => 1741190837040
)
In \SLP_AJAX::execute_location_query()
$default_query_parameters[] = $this->query_limit;
$this->query_limit is set to "5".
...
$query_params = apply_filters( 'slp_ajaxsql_queryparams', $default_query_parameters, $query_slug );
$query_params =
Array
(
[0] => 3959
[1] => 34.043925
[2] => -118.242429
[3] => 34.043925
[4] => 200
[5] => 5
)
\MySLP_REST_API::get_map_locations()
Sets the limit properly.

\SLP_AJAX::find_locations() is messing it up here:
public function find_locations( $mode = 'search' ) {
$this->slplus->notifications->enabled = false;
$response = array();
if ( $mode === 'search' ) {
$this->query_limit = $this->slplus->options_nojs['max_results_returned'];
} else {
$this->query_limit = $this->slplus->SmartOptions->initial_results_returned->value;
}
OMG – those are flipped…
$mode = ‘search’ is when a zip search is performed, it should be getting ‘max_results_returned’ (Number to show)
$mode = ‘load’ is when the initial map loads and should be getting ‘initial_results_returned‘ (Number to show initially).
And this is fucked…
MySLP_REST_API was forcing all searches back to ‘csl_ajax_onload’ making the action default the priority vs. the incoming query.

MySLP_REST_API was also setting limit in other methods incorrectly.
Created a new method to make this value grab more consistent: \SLP_AJAX::getLimitBasedOnMode()