[Resolved] Google maps issue and Convert Cache error
This thread is resolved. Here is a description of the problem and solution.
Problem:
The issue here is that the user was getting the error "Progress: An unknown error has happened." when trying to convert maps to the new caching system.
Solution:
This issue can be resolved by running the following sql query.
alter table wp_postmeta convert to character set utf8mb4 collate utf8mb4_unicode_520_ci;
This support ticket is created 5 years, 4 months ago. 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.
Starting from some time ago, on all my sites I see a notice:
Toolset Maps: You've got some address data cached. Convert it to a new, more efficient format to gain significant performance benefits on Troubleshooting Page!
When I go to the Troubleshooting Page and click Convert Cache, I get the following:
The action is now completed.
Progress: An unknown error has happened.
The response is consistent throughout all my sites. Is it supposed to be like that?
Besides, the maps don't work as expected. For example, I select a location in Address field and output it on the map via php:
If I print_r() the $location, it gives the correct data, for example: Array ( [0] => Peterhof, Saint Petersburg, Russia )
But on the map, when I click on the marker, I see the name of a completely different place that was chosen once in another article: Altai Krai, Russia. I see that name on every map I add. You can check it yourself here: hidden link (at the bottom of the article).
In order to understand the caching error I would need to have access to one of the sites where you are experiencing this.
I also noticed this this Array ( [0] => Peterhof, Saint Petersburg, Russia ) in your message but your $marker is clearly giving something different which it shouldn't.
Would it be possible to get access to this site so that I can do a thorough check on your code to see why this is happening ?
If not then would you mind providing me with a copy of the site using the duplicator plugin ?
It could be your caching plugin causing interference with the map because it works fine in my testing but a little inconsistent even when nothing has changed.
Could also be why the cache conversion for the map isn't working either.
I would try disabling the plugin to see what would happen but in my testing with the map the correct location is shown but the incorrect name even though the marker data is the same. I noticed if I add some text before the marker data it also shows up correctly as well.
Thanks for looking into it. I disabled the plugin and it did not change anything. Still the same error and incorrect location displayed.
But it made me thinking: I'm using Cloudflare on this website, can it be the reason? Is your Maps plugin tested with Cloudflare?
Although I don't use Cloudflare on other websites and still can't convert cache with the same error. Can't say about maps as it's the only place where I use them for now.
I've investigated the issue for you and found that it was being generated by this error here.
WordPress database error COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'utf8mb4' for query CREATE TABLE wp_toolset_maps_address_cache (
address_passed varchar(190) NOT NULL,
address varchar(255) NOT NULL,
point point NOT NULL,
PRIMARY KEY (address_passed)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8_general_ci made by do_action('wp_ajax_toolset_maps_update_address_cache'), WP_Hook->do_action, WP_Hook->apply_filters, Toolset_Ajax->__call, Toolset_Maps_Ajax_Handler_Update_Address_Cache->process_call, OTGS\Toolset\Maps\Controller\Cache\CreateDatabaseTable::run, dbDelta
I've reported this to our team to see if there can be a fix for this.