Saltar navegación

[Resuelto] Cannot get map to show all locations.

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem: After migrating an existing site to a new server, I have noticed that some markers that were displayed on my maps on the old site do not appear on my maps on the new site. In the server logs, I can see repeated messages about missing functions ST_X and ST_PointFromText:

...FUNCTION **.ST_X does not exist
...FUNCTION **.ST_PointFromText does not exist

Solution: Toolset's mapping features make use of functions provided in MySQL 5.6+. If your site runs a version of MySQL lower than 5.6, several maps features may not work as expected and you may find errors in the PHP logs. Check the server's current MySQL version and update if necessary. Ask your hosting provider for assistance with that upgrade, if needed.

This support ticket is created hace 3 años, 8 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Este tema contiene 5 respuestas, tiene 2 mensajes.

Última actualización por thomasK-7 hace 3 años, 7 meses.

Asistido por: Christian Cox.

Autor
Mensajes
#2052091

We have a list of locations. The search works fine. Also the filter.

But the map only shows 4 locations (instead of 50 or so). I cannot find any way to influence the map, although it seems to be referenced correctly...

We are transferring this from their old page to a new one. It works on the old page, but not on the new page....any ideas?

#2052323

Hello, if you are transferring from one site to another and the View contains a distance filter, the problem could be that the maps cache tables from the original site were not transferred to the new site's database. The maps cache is required for distance filtering, so it's possible that the new site's cache has not been fully loaded. You can go to Toolset > Settings > Maps and click "Load cached data" to examine the cached locations on the old site and the new site. There should be a similar number of cached locations in both sites. Otherwise, the database cache table was not transferred correctly during the site migration.

Another way to test is to edit one of the posts with a missing map marker in wp-admin. This will update the cache for that post, and it should begin appearing in the View. If the marker begins appearing after editing the post in wp-admin, the problem is most likely the cache table is not transferred correctly during migration.

You can also go to wp-admin > Toolset > Settings > Maps and click "Check API" to verify the maps API is set up correctly for the new site.

If the View does not contain a distance filter, it's possible the address custom field values were not transferred to the new site correctly.

If you are unable to determine the source of the problem, I may need to log in to the site and take a closer look.

#2053497

Hi, I'm still investigating the issue here but unfortunately I did not find a complete solution yet today. I plan to give you an update as soon as possible when my workday starts tomorrow. Thank you for your patience.

#2054553

I'm still investigating here, but I cannot find any obvious reason why these markers are not all appearing as expected and why the maps address cache table appears empty in Toolset > Settings > Maps. These issues could be caused by a server-side problem, an issue introduced during migration, or a conflict with another 3rd-party plugin or theme configuration that is not obvious on the original site.

1. Is it okay for me to temporary deactivate other 3rd-party plugins and activate a default theme like Twenty Twenty One here in the test site to rule out any sources of potential conflict from other site components? I will reactivate the deactivated components once I am finished testing.

2. Can you activate server logs or provide existing error logs we can examine for server-side or database error messages? If you're not familiar with the server error logs, I can show you how to activate one temporarily. Go in your wp-config.php file and look for

define('WP_DEBUG', false);

Change it to:

define('WP_DEBUG', true);

Then add these lines, just after the WP_DEBUG line:

define('WP_DEBUG_LOG', dirname(__FILE__) . '/error_log.txt');
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
define('WP_DISABLE_FATAL_ERROR_HANDLER',true);

Now visit this page and refresh/reload the page a couple of times to trigger map caching processes:
enlace oculto

Edit this Klinkin post:
enlace oculto
It currently has no address. As a test, choose any valid address and save the post. Refresh/reload the Klinkin post editor page a couple of times.

If any server-side errors are triggered during these updates, it will create an error_log.txt file in your site's root directory. Use FTP to look for this file in the same directory as your wp-config.php file. You may need to click "Refresh" in your FTP browser to see a new file appear. Please download this file to your computer, open it in any text editing software, and send me its contents. Once that is done, you can revert the changes you made to wp-config.php, delete the log file using FTP, and delete the temporary address from the post here:
enlace oculto

Let me know what you find out and we can go from there.

#2058311

Okay thank you for the additional information, this log reveals the problem. The log mentions these missing functions repeatedly:

WordPress-Datenbank-Fehler FUNCTION ***.ST_X does not exist
...
WordPress-Datenbank-Fehler FUNCTION ***.ST_PointFromText does not exist
...

When these functions are missing, it typically indicates the installed MySQL version on the new server is lower than the required version 5.6:
https://toolset.com/toolset-requirements/

MySQL 5.6+ is required for many of our mapping features and distance operations. You may need to ask your hosting company for assistance upgrading your server to run MySQL 5.6+, to take advantage of the more modern database functions required for map location encoding and caching. Once the database is upgraded, you should begin seeing addresses stored in the maps cache in Toolset > Settings > Maps, and more markers should begin appearing on your maps as expected.

Hopefully this will be an easy change in the server configurations for your hosting company, and the problem will be resolved. I'll stand by for your update.

#2061437

I worked!