- This topic has 2 replies, 2 voices, and was last updated 1 year, 7 months ago by KZeni.
January 31, 2022 at 11:20 pm #72120KZeniMember
Not sure how this hasn’t been a more prevalent issue until now, but I found that the carousel listing for map markers currently has the marker description output into
<p class="wpgmza_marker_description"></p>. This is then obviously problematic since the description field is a visual editor where it can contain multiple paragraphs, images, etc. Honestly, I found that even having a single line of basic text has the tag it’s trying to be inserted into be escaped per the AJAX call retrieving that content where it already has its own paragraph tag (even for a basic single line of text.)
This renders the use of that CSS class useless as it’s immediately escaped by the description’s own paragraph tag while then leaving that output without a good CSS class/selector for styling/hiding that part of the carousel’s output.
wp-google-maps-pro/html/marker-listings/legacy/carousel-item.html.phpneeds to be edited so
<p class="wpgmza_marker_description"></p>is instead
<div class="wpgmza_marker_description"></div>so whatever the marker description contains won’t escape that container element (then supporting a rich output, if needed.)
Alternatively, the AJAX call could strip the output to be more like the most basic excerpt where it’s 100% plaintext which can then be inserted into the existing
<p class="wpgmza_marker_description"></p>element without issue. However, this probably isn’t as nice as some will probably want whatever the marker description has as what’s shown by default (then able to strip it down, if needed, whereas going about it the other way is much more involved.)
I have a site where I have the carousel show, but I want the marker description shown elsewhere while not visible in the carousel itself. As such, I need that
.wpgmza_marker_descriptionselector to be
display:none;, but a basic line of text for the description escapes the paragraph from the existing
/wp-google-maps-pro/html/marker-listings/legacy/carousel-item.html.phpfile. Therefore, I proactively patched my setup to have this use a div element instead of a paragraph element as I proposed as the ideal fix above.
I do see this file is under a Legacy folder, but this really is fixing an active bug. Meanwhile, it shouldn’t break things for people unless they specifically targeted it to be a paragraph tag for some odd reason (then again, they’d already be using a broken setup per it being escaped via the description editor so it’s still fixing another issue they might have.) Also, I patched my setup to have it be a div element and I’d love for it to be able to receive future updates without losing this fix in the process. Finally, I’m unaware of a different way to output the carousel of markers… how is this considered “legacy” if there’s no replacement available (definitely warranting it be fixed still per it having active use cases still being created)? Correct me if there is an alternative I’m unaware of.
I did submit this as a support ticket to hopefully be patched sooner than later, but I also wanted to make this publicly available just in case others come across the issue as well.February 2, 2022 at 7:35 am #72126StevenModerator
Thank you so much for getting in touch, we really appreciate your time.
I have kindly noticed that you are presently talking to one of our developers directly via our support desk and any bugs mentioned, will be discussed further and resolved via the direct discussion in the open ticket.
Steven De BeerFebruary 2, 2022 at 4:50 pm #72145KZeniMember
Sounds like the issue will be patched in a plugin update to be released in the next couple of days. This can effectively be considered resolved at this point.
- You must be logged in to reply to this topic.