Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,
    parsing of shortcodes in popuptexts is only possible on marker maps; due to current technical limitations, in layer maps these shortcodes are displayed as text. Not sure if that will be changed in the future (at least for now as now technical solution is available).
    best,
    Robert

    Thread Starter caneblu

    (@caneblu)

    not even with “do_shortcode” option?

    thanks for insisting on a solution ?? this made me thing about the issue in a new way and perhaps I found a fix for this. The issue is/was that control characters produced by a shortcode would break the geojson array needed for layer maps and thus break the map.

    I now found a regex which should remove all control characters, but I have to check in detail if there are any sideffects:

    preg_replace('/[\x00-\x1F\x7F]/', '',$content)

    If you are good in regex, let me know ??

    Hi again,
    I think I found a valid solution – can you please test it?
    1. download https://www.mapsmarker.com/dev/leaflet-geojson.txt
    2. backup /wp-content/plugins/leaflet-maps-marker-pro/leafet-geojson.php
    3. replace content of leaflet-geojson.php with the content of the txt-file
    let me know if that would work for you!
    best,
    Robert

    Thread Starter caneblu

    (@caneblu)

    Super, now working like a charm.
    My approach would be different, like try to execute the shortcode, but your way is good at same. Unfortunately the caption in the picture made automatically a shortcode. Now it’s better in my opinion.

    got the same problem, the patch is not working for me.

    I think you could weed out 99% of the problems by just clearing the caption-shortcode. I guess the caption-shortcode is most common since it will just pop up by inserting an Image and filling out the “Caption” Field.

    I built a really bad regex which could be used to clear it:
    https://regex101.com/r/cA4dO8/1

    For the record:

    \[caption(.*)\]\<a(.*)\<\/a\>(.*)\[\/caption\]

    please make sure you have the latest version I installed which filters hidden control characters in the GeoJSON array.
    If you need shortcode parsing in popups, please make sure to use Maps Marker Pro where this feature is supported.
    best,
    Robert

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘popup-marker with images with caption’ is closed to new replies.