Hello,
on my site toolset maps works in the backend and in single post, for example:
versteckter Link
I use an adressfield as data-source.
When I try to add several markers in a loop, I only see a part of Africa:
versteckter Link
The page is in a multisite on PHP 7.1. The three required Google maps APIs are activated. I tried to add it like you described in your documentation, but can't get it running. Any idea?
Best, Daniel
Please provide login credentials in the private reply fields here.
Thank you. Unfortunately I was unable to figure this out by the end of my day, but I will be available again on Sunday to continue investigating. If you need more immediate assistance, feel free to start a new ticket and request assistance. Thanks!
Okay I was able to get a clone of the whisky site working as a standalone site in my local environment. I deactivated all drop-ins, caching systems, and plugins except Types, Views and Maps. I kept the GeneratePress theme active, and updated to the latest WordPress. The map loaded as expected for me, with clusters over the UK/Ireland area and over Japan - see screenshot. So next, I proceeded to activate other plugins. Since I'm running a standalone site, I didn't activate any of the multisite plugins. I'm not able to reproduce the problem locally. So that leads me to believe the problem could be one of the following:
1. A conflict with one of the multisite plugins used on your multisite installation
2. A problem with server-side caching
3. A configuration problem in your .htaccess or .user.ini files on the server
Do you have a staging area set up where we can try deactivating plugins? Since this is a multisite installation, making those kinds of changes can have a significant impact on a live site.
Hello Christian,
thanks a lot. I have no staging environment, but I'll disable the multisite-plugins temporarily and come back here.
Best, Daniel
Hello Christian,
thanks so much! I found the error. When I deactivated code snippets plugin it worked. But I have it running in other multisites, so it must have been a problem with one of the snippets itself.
So I deactivated them also one on one and found the evildoer. It is a snippet, which I use to allow some html in excerpts in GeneratePress.
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
add_filter('get_the_excerpt', 'generate_improved_trim_excerpt');
function generate_improved_trim_excerpt($text) {
global $post;
if ( '' == $text ) {
$text = get_the_content('');
$text = apply_filters('the_content', $text);
$text = str_replace(']]>', ']]>', $text);
$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
$text = strip_tags($text, '<p>,<br>,<strong>,<em>,<img>');
$excerpt_length = 55;
$words = explode(' ', $text, $excerpt_length + 1);
if (count($words)> $excerpt_length) {
array_pop($words);
array_push($words, '[...]');
$text = implode(' ', $words);
}
}
return $text;
}
But I don't know why it collides with maps plugin.
Best from Germany
Daniel
It seems that the get_the_excerpt filter code changes the map ID somehow, and I'm not sure why. In my local system an extra "-1" is appended to the ID, which breaks the map initialization code.
js-wpv-addon-maps-render-map-9-1
The line that applies the_content filter seems to be responsible. Not sure why exactly.
Thanks a lot again! I'll leave it as it is now without html in excerpt.