This topic contains 3 replies, has 2 voices, and was last updated by Sofia Moss 3 years ago.
Super Store Finder – “DESCRIBE IF” SQL Syntax in Query Monitor
-
Hello there,
I have an issue with Super Store Finder.After last updates my website sometimes had performance issue, I installed the “Query Monitor” plugin which found this:
“DESCRIBE IF; | ssf_wp_install_tables() | Plugin: superstorefinder-wp | You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘IF’ at line 1 | 1064”
the plugin is updated to its latest version 6.7, WordPress and rest plugins are also updated.
Also found out that Super Store Finder load on pages which don’t contain the map shortcode:
“SELECT post_name, post_content
FROM ecoel21_posts
WHERE LOWER(post_content) LIKE ‘%[super-store-finder%’
AND (post_name=”
OR ID=”
OR ID=”)
ssf_wp_head_scripts()
Plugin: superstorefinder-wp 0 0.0470”Is there any way to make it load only on desired pages and not on every page?
Thanks in advance!
Hi there,
Thanks for reaching out, you can try to use the JSON option at admin settings page which will improve performance, more details available in this article here.
We’ve also forwarded your feedback to our devs team, in file, wp-content/plugins/superstorefinder-wp/ssf-wp-functions.php, you can delete or comment out dbDelta($sql); at line 372 which will resolve the error issue.
If there’s still error, you can delete the entire line 369 to 374.
As for the plugin asset, if you don’t plan to use the store locator at home page, you can try to edit wp-content/plugins/superstorefinder-wp/ssf-wp-functions.php
Try to search for below code
if ($show_on_all_pages || $on_ssf_wp_page || $show_on_archive_404_pages || $show_on_front_page || $on_ssf_wp_post || $show_on_custom_post_types || function_exists('show_ssf_wp_scripts') || $show_on_page_templates || $plugin_asset_all_pages=='true') {
replace it with
if ($on_ssf_wp_page || $show_on_archive_404_pages)
Save and upload and refresh the page.
Our devs team have checked and run the SQL query and it appears to only showing result of WP posts / pages only with the shortcode as screenshot below. If there are shortcodes in any unwanted pages, you can delete them.
In addition, some of the code above are meant to fix compatibility issues at WordPress.com hosting environment.
If you don’t use WordPress.com, you can safely perform the entire changes highlighted above.
Cheers,
SofiaHello again,
thank you very much for your answer, it helped a lot!1) Had enabled the JSON option at admin settings and the map loads really quicker than before
2) Alternated the ssf-wp-functions.php as described and the sql issue disappeared
Only question now is, how can I keep the changes in ssf-wp-functions.php after a plugin’s update?
Hi there,
That’s really great! For item #2, you may need to redo the changes, as mentioned as per our devs team update, the code is for WordPress.com hosting environment compatibility (during plugin update) and the DESCRIBE IF will not cause any issues, you can leave it or remove the code as per instructions until our devs team have figured a workaround in the future, we’ll put it in the patch notes.
Cheers,
Sofia
The topic ‘Super Store Finder – “DESCRIBE IF” SQL Syntax in Query Monitor’ is closed to new replies.