Theme “twenty twelve does not exist” ranger creek categories
Sadly, some of the accounts like “ranger_creek” are not longer available and are not able to show the issue. It is difficult finding which accounts reproduce the errors and where.
Store Locator Plus® Internal Docs
SLP Internal Documentation
General posts.
Theme “twenty twelve does not exist” ranger creek categories
Sadly, some of the accounts like “ranger_creek” are not longer available and are not able to show the issue. It is difficult finding which accounts reproduce the errors and where.
Notice: Function WP_Scripts::add was called incorrectly.
The script with the handle “google_maps” was enqueued with dependencies that are not registered: slp_core.
slp_core is the WordPress handle for the slp_core.js file.
slp_core.js is the primary Google maps interface between WordPress and JavaScript
Where the slp_core is found in store-locator-plus v2603.03.01

slp_core is REGISTERED here: \SLP_Actions::wp_enqueue_scripts
slp_core is currently only enqueued here: \SLP_UI::render_shortcode
This loads a URL similar to:
https://maps.googleapis.com/maps/api/js?libraries=geometry,marker&v=quarterly&language=en®ion=US&key=<GOOGLE_API_KEY>&loading=async
In the JavaScript this is referenced as google.maps.*
Google Maps is only enqueued here with the google_maps hook: \SLPlus::enqueue_google_maps_script
* @used-by \SLPlus::nqGoogleMaps
* @used-by \SLP_Actions::wp_enqueue_scripts
* @used-by \SLP_Admin_UI::initialize via the WordPress admin_enqueue_scripts hook
google_maps is used for users that are not logged in (non-admin) when rendering the SLPLUS shortcode.
This is managed via \SLP_UI::render_shortcode
\SLP_Power_UI::at_startup adds google_maps as a js_requirement (managed by \SLP_BaseClass_UI as part of normal UI interface management). This is likely unnecessary.
JavaScript References
This is called on the slp_manage_locations (Location Details) admin page: \SLP_Admin_UI::initialize
via add_action( ‘admin_enqueue_scripts’, array( $this, ‘enqueue_slp_core_and_google_maps’ ) );
JavaScript References
@amelia – We need to fix a script enqueue issue on the Location Details page
___
The script with the handle “google_maps” was enqueued with dependencies that are not registered: slp_core.
__
This error is caused because the WordPress script with the handle slp_core is not enqueued.
__
Option 1: We could enqueue this by calling \SLP_UI::render_shortcode
For the JavaScript in slp_core to be fully functional it requires localized variables.
Currently this only happens in \SLP_UI::render_shortcode
The problem is that \SLP_UI::render_shortcode has the extra overhead:
– Generating a large HTML output string
– Firing a slp_after_render_shortcode action
We only want the JavaScript variables configured and then localized via \SLP_UI::localize_script
If we use this method, we would need to bypass the HTML output and slp_after_render_shortcode action hook processing.
The best way to hook that would be to rewrite \SLP_Admin_UI::initialize to call a new method:
– Replace add_action( ‘admin_enqueue_scripts’, array( $this->slplus, ‘enqueue_google_maps_script’ ) );
– With add_action( ‘admin_enqueue_scripts’, array( $this, ‘enqueue_slp_core_and_google_maps’ ) );
Create a new method \SLP_UI::enqueue_slp_core
– Extracts the first chunk of \SLP_UI::render_shortcode up to the wp_enqueue_script( ‘slp_core’ );
– It needs to accept the parameters from \SLP_UI::render_shortcode
Create a new method \SLP_Admin_UI::enqueue_slp_core_and_google_maps
– call the new \SLP_UI::enqueue_slp_core method
– call \SLPlus::enqueue_google_maps_script
Update \SLP_UI::render_shortcode to call \SLP_UI::enqueue_slp_core to replace the code that was moved to the new \SLP_UI::enqueue_slp_core method
\SLP_UI::register_slp_scripts_if_needed is a duplicate of \SLP_Actions::wp_enqueue_scripts.
This unnecessary extra code.
Duplicate code should be avoided when possible.
Created \SLP_UI::enqueue_slp_core with admin_safe flag resulting in inefficient architecture.
This is only called with the admin_safe flag from \SLP_Admin_UI::enqueue_slp_core_and_google_maps.
The register_slp_scripts_if_needed call in the admin_safe short circuit block can be put inline in the calling method as a call to \SLP_Actions::wp_enqueue_scripts.
The admin_safe only method localize_script_admin_safe could should be in SLP_Admin_UI as it is an admin only method: \SLP_Admin_UI::localize_script_admin_safe.
The wp_enqueue_script( ‘slp_core’ ); call can be in the calling method as well.
Returning the $attributes array is not necessary.
My fixes to the AI work:
Rip out the admin_safe short circuit from SLP_UI and place the equivalent code in SLP_Admin_UI as these updates only related to admin hooks. SLP_UI relates to non-admin code and should not have admin-only methods in there. Us nqGoogleMaps in admin as that can certainly load in async versus defer mode.
in SLP_Admin_UI
public function enqueue_slp_core_and_google_maps( string $hook = '' ): void {
$slp_actions = SLP_Actions::get_instance();
$slp_actions->wp_enqueue_scripts(); // misnomer - registers the slp_core script
$this->localize_script_admin_safe();
wp_enqueue_script( 'slp_core' );
$this->slplus->nqGoogleMaps( $hook );
}
/**
* Localize only the data needed for admin enqueue paths without invoking shortcode SmartOptions callbacks.
*/
private function localize_script_admin_safe(): void {
$scriptData = array(
'options' => is_array( $this->slplus->options ) ? $this->slplus->options : array(),
'environment' => array(
'addons' => $this->slplus->AddOns->get_versions(),
'slp_version' => SLPLUS_VERSION,
),
'plugin_url' => SLPLUS_PLUGINURL,
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'nonce' => wp_create_nonce( 'wp_rest' ),
'apikey' => SLPlus::get_instance()->get_apikey(),
'rest_url' => rest_url( 'store-locator-plus/v2/' ),
'messages' => $this->get_messages(),
'shortcode_attributes' => $this->js_attributes,
);
ksort( $scriptData['options'] );
wp_add_inline_script(
'slp_core',
'const slplus = ' . wp_json_encode( $scriptData )
);
}
/**
* Set the messages for us in the JS array.
*
* @return string[]
*/
private function get_messages(): array {
$messages = $this->slplus->Text->get_text_group( 'messages' );
return apply_filters( 'slp_js_messages', $messages );
}
In SLP_UI
Move the localize_script_admin_save to the SLP_Admin_UI module where it belongs. Have register_slp-scripts_if_needed method call SLP_Actions->wp_enqueue_scripts in SLP_Actions.
private function register_slp_scripts_if_needed(): void {
$slp_actions = SLP_Actions::get_instance();
$slp_actions->wp_enqueue_scripts();
}
The latest update needs to be reviewed. It is calling enqueue_google_maps_script from \SLP_Admin_UI::initialize
With add_action( ‘admin_enqueue_scripts’, array( $this, ‘enqueue_slp_core_and_google_maps’ ) );
Need to look at Premier interfaces listed above for Google Maps interactions.
This should be showing the Google Map to show the map center.
While testing Power : Imports Are Not Working other issue were noted about missing images and fonts.
On the WordPress QC Site looking in the JavaScript console shows some WOFF/TTF and image files are missing in the CSS stack.
Need to update the Store Locator Plus® plugin distribution.
🔲 All CSS fonts (woff/woff2/ttf) files are missing
Check the distribution packaging ruleset in the AWS CodeBuilder https://qc.storelocatorplus.com/wp-content/plugins/store-locator-plus/css/fonts/fontawesome-webfont.woff2?v=4.7.0
https://qc.storelocatorplus.com/wp-content/plugins/store-locator-plus/css/fonts/fontawesome-webfont.ttf?v=4.7.0
https://qc.storelocatorplus.com/wp-content/plugins/store-locator-plus/css/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular
🔲 Some CSS images are missing
https://qc.storelocatorplus.com/wp-content/plugins/store-locator-plus/css/admin/DataTables-1.10.24/images/sort_both.png
https://qc.storelocatorplus.com/wp-content/plugins/store-locator-plus/css/admin/DataTables-1.10.24/images/sort_asc.png
The Store Locator Plus® (SLP) application includes a series of scrolls that govern how the Store Pages feature manifests in both the MySLP SaaS platform and the WordPress plugin builds. The following sections summarize the core scrolls discovered in our recent analysis.

When tracing the settings for active_style_css, it looks like it is loading multiple times… need to investigate later for possible performance improvements.
Call 1

Call 2

Call 3

Call 4

Call 5

add_menu_page(
string $page_title,
string $menu_title,
string $capability,
string $menu_slug,
callable $callback = ”,
string $icon_url = ”,
int|float $position = null
): string
| Standard | Network Admin |
|---|---|
| 2 – Dashboard | 2 – Dashboard |
| 4 – Separator | 4 – Separator |
| 5 – Posts | 5 – Sites |
| 10 – Media | 10 – Users |
| 15 – Links | 15 – Themes |
| 20 – Pages | 20 – Plugins |
| 25 – Comments | 25 – Settings |
| 30 – Updates | |
| 59 – Separator | |
| 60 – Appearance | |
| 65 – Plugins | |
| 70 – Users | |
| 75 – Tools | |
| 80 – Settings | |
| 99 – Separator | 99 – Separator |
| Standard / User | Network Admin |
|---|---|
| 1.10 – MySLP myslp-dashboard | 1.10 – Manage MYSLP_MANAGE_MENU_SLUG ‘myslp-manage-menu’ 10 – Customers 30 – History Log 50 – Cron : System 51 – Cron : User 80 – Database 70 – Addressess |
| 1.20 – Store Locator Plus® csl-slplus | |
| 1.30 – Config MYSLP_CONFIG_MENU_SLUG ‘myslp-config-menu’ 10 – Plans 15 – Plan Limits 20 – Plugins 25 – Email Settings 30 – Payments 70 – System Settings 80- Cache | |
| 2 – Dashboard | 2 – Dashboard |
| 4 – Separator | 4 – Separator |
| 5 – Posts | 5 – Sites |
| 10 – Media | 10 – Users |
| 15 – Links | 15 – Themes |
| 20 – Pages | 20 – Plugins |
| 25 – Comments | 25 – Settings |
| 30 – Updates | |
| 59 – Separator | |
| 60 – Appearance | |
| 65 – Plugins | |
| 70 – Users | |
| 75 – Tools | |
| 80 – Settings | |
| 99 – Separator | 99 – Separator |
If you change settings in Staging , Under Map or View get errors , example:
Deprecated: Calling get_class() without arguments is deprecated in
mu-plugins/store-locator-plus/include/module/admin_tabs/SLP_BaseClass_Admin.php on line 592
Added get_class($this) to the method in SLP_BaseClass_Admin on line 592 as required by PHP 8.
See Lance Cleveland’s WordPress Hooks Order Of Precedence.
Generic WordPress + MySLP processing of a page request.
Fires once activated plugins have loaded. The hook is generally used for immediate filter setup, or plugin overrides. The plugins_loaded action hook fires early, and precedes the setup_theme, after_setup_theme, init and wp_loaded action hooks.
Fires after WordPress has finished loading but before any headers are sent. Most of WP is loaded at this stage, and the user is authenticated.
Executed during WordPress : init hook via SLP_Actions::init() after all of the main SLP plugin init stuff has been executed.
add_action( 'slp_init_complete', array( __CLASS__, 'slp_init_complete' ) );Called when processing a REST API call.
\SLP_Premier_AJAX::add_ajax_hooks()
\SLP_AJAX::renderJSON_Response()
\SLP_Experience_AJAX::add_ajax_hooks()
\SLP_Premier_AJAX::add_ajax_hooks()
\SLP_AJAX::execute_location_query()
\SLP_REST_Handler::valid_referer() for any site that is not coming from get_site_url() or get_home_url(). This is run via the WordPress REST API handler via the register_rest_route() for the readable request for geocoding at the wp-json/store-locator-plus/v2/geocode/<address> endpoint. This happens via the permission_callback property.
Recently stood up a new ECS container for the Store Locator Plus® staging app. We can connect to the app and login, but the app cannot talk to the outside world. It is not connecting to WordPress news service and cannot validate a WP SMTP Pro license.
This is the notebook for resolving that issue.
A Stack Overflow article that nearly describes our situation.
You are using the awsvpc network mode. This means that each ECS task gets its own Elastic Network Interface (ENI). With this configuration, the ECS tasks do not use the underlying EC2 instance’s network connection, they have their own network connection, with their own IP addresses.
network_configuration block. You will need to change assign_public_ip to true in order to have ECS assign public IP addresses to the ECS Task’s ENIs, so that the ECS tasks can access resources outside of the VPC.awsvpc ECS deployed to EC2. You can only do that with Fargate deployments. So your options are to use a different network mode, so you can use the EC2 instance’s public IP from your ECS task: docs.aws.amazon.com/AmazonECS/latest/bestpracticesguide/… or switch to private subnets and a NAT Gateway.Enable VPC internet access using internet gateways
“An internet gateway enables resources in your public subnets (such as EC2 instances) to connect to the internet if the resource has a public IPv4 address or an IPv6 address. “
Configuration for Internet Access
Connect Amazon ECS applications to the internet


Task Definition: slp_saas_staging:4
arn:aws:ecs:us-east-1:744590032041:task-definition/slp_saas_staging:4
Load Balancer: application load balancer myslp-staging-alb
arn:aws:elasticloadbalancing:us-east-1:744590032041:loadbalancer/app/myslp-staging-alb/2eae5893f2db5c1b
Target Group: ecs-myslp-staging-target
arn:aws:elasticloadbalancing:us-east-1:744590032041:targetgroup/ecs-myslp-staging-target/331cd16e4b3c52e1
VPC: slp-cluster-vpc
ECS instances using AWSVPC have no public IP address on the running instance/container and thus cannot route through the Internet Gateway despite it being on the VPC and subnet where the EC2 instance and container are attached.
To resolve this issue, we need to separate the subnets for your ECS tasks and the ALB, and configure the routing appropriately.
Keep the existing public subnet(s) for your ALB unchanged, with the Internet Gateway attached.
myslp-staging-alb
DNS Name: myslp-staging-alb-1533129727.us-east-1.elb.amazonaws.com
VPC: slp-cluster-vpc (vpc-1b5e2c7c)
Subnets:
slp-cluster-east-1a : subnet-7c8a8124 us-east-1a (use1-az6)
slp-cluster-east-1c : subnet-7b232951 us-east-1c (use1-az2)
slp-cluster-east-1d : subnet-5213e91b us-east-1d (use1-az4)
slp-cluster-east-1e : subnet-d00210ed us-east-1e (use1-az3)
Internet Gateway: slp-cluster-gateway (igw-ab3d34cf)
attached to slp-cluster-vpc



And add a route to the general internet (0.0.0.0/0) that goes through the NAT gateway.

Note: You cannot update the network configuration of an existing ECS service. Therefore, you need to recreate the service.
Put the new service on the private subnets only.
Update the auto scaling group to add the private subnet with the NAT gateway.
The container using AWSVPC will not have a public IP address. That means the automatic routing for outbound connections will never use the Internet Gateway.
You need to setup a VPC with a public subnet (we have 4 zones , A C D E) and private subnet in those same zones.
The cluster will setup an automatic scaling group, something like Infra-ECS-Cluster….* which will define the Auto Scaling group via the infrastructure subcomponent of the cluster.
The Auto Scaling Group(ASG) needs to include both the private and public subnets.
The EC2 instances it spins up can be in the private subnet (let ASG decide).
The cluster service will setup the application load balancer (ALB) and target group. The service must be placed in the private subnet only. This will ensure the subsequent tasks (container instances) run on the private subnet. The ALB that is created must be assigned to the public subnets on the VPC to allow general inbound traffic from the internet to find its way over to the container on the private subnet. As a side note, the target group listens on HTTPS port 443 and routes to the container HTTP port 80. Use the service to create the ALB and target groups.
On the VPC…
Make sure the default routing table is explicitly assigned to the public subnets and NOT the private subnets.
Create an Internet Gateway (IG) and attach it to the VPC. This will allow inbound traffic from the internet to any service on the VPC with a public IP, in our case the application load balancer listener on port 443.
Create a NAT Gateway. Assign all the private subnets to be part of the NAT Gateway.
Create a second routing table and assign the private subnets to this table. Add a route to 0.0.0.0/0 that goes through the NAT Gateway.
If there are any tasks, containers, or EC2 instances already running stop and reinstantiate each of them. If the service was created originally on the public subnet of the VPC it will need to be deleted and recreated on the private VPC subnets.
This process is for updating the staging Store Locator Plus® SaaS server running on an ECS cluster after performing code updates.
These processes require a locally installed copy of the MySLP AWS ECS Kit repository which can be found at ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/myslp_aws_ecs_kit.
Edit your code or deployment kit files first. This can include WordPress plugins or themes, the Docker composer or image builder commands, helper scripts, or various configuration files used to manage and deploy the Store Locator Plus® SaaS container images.
Once your updates are ready, make sure the WordPress stack is up-to-date by updating the submodule links, then commit all of your updates to the MySLP AWS ECS Kit repository on the proper branch. There are AWS CodePipeline services running that will monitor the repository for changes, build any images as needed with ECR and deploy them via the Elastic Container Service if possible. Details on the processes are noted below.
From the MySLP AWS ECS Kit git project root:
./tools/create_mustuseplugins_stubs.sh
Commit any changes to the MySLP AWS ECS Kit repository.
When you push the changes from your local develop, staging, or production branch an AWS listener service will detect the code changes and run Code Pipeline tied to services such as CodeBuild and ECS to deploy the final Store Locator Plus® SaaS container in the AWS cloud.
Commits to local branches will not trigger a change in the AWS deployments.
Commits to any branch not specifically named develop, staging, or production will not trigger changes in the AWS cloud deployments.
The CodePipeline that is configured to deploy the staging containers is named myslp-webserver-staging-pipeline.
The pipeline monitors the staging branch on the AWS CodeCommit repo for the MySLP AWS ECS Kit project at ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/myslp_aws_ecs_kit
The source will be read from the URL above and a series of commands will be executed in the cloud to create an container image. This image is stored in the AWS Elastic Container Registry as a private image.
The Store Locator Plus® SaaS (internal name: MySLP) container images are stored in the 744590032041.dkr.ecr.us-east-1.amazonaws.com/myslp2024-aarch64 docker image repository.
Staging branches will tag the latest build with the :staging tag.
The deploy stage will execute if the build stage completes successfully. This stage will attempt to take the latest myslp2024-aarch64:staging ECR image and launch an active container in the AWS Elastic Container Service.
The deploy stage will attempt to launch a running container in the myslp-staging-cluster on the myslp-staging-service service within that cluster.

aws sso login --profile lance.cleveland
aws ecr get-login-password --region us-east-1 --profile lance.cleveland | docker login --username AWS --password-stdin 744590032041.dkr.ecr.us-east-1.amazonaws.com/myslp2024-aarch64
cd ./Docker/Images
docker build --platform=linux/arm64 -t 744590032041.dkr.ecr.us-east-1.amazonaws.com/myslp2024-aarch64:staging .
docker push 744590032041.dkr.ecr.us-east-1.amazonaws.com/myslp2024-aarch64:staging
We use a 20-site pro license to manage email on the new server clusters via the WP Mail SMTP Pro service.
You will need to network activate the plugin and get the site license key to enable it.
Use Amazon SES service to send email. To configure you will need the Access Key and Secret Access key to set this up. These are in Lance’s password manager app — or you will need to create a new identity under the storelocatorplus.com domain in SES and create a new key pair.