Block error when loading (SVG marker icon)
-
When an SVG marker icon is used, the block doesn’t load anymore in Gutenberg editor:
Block validation: Block validation failed for
cgb/block-gosign-googlemaps
(Content generated by
save
function:` <div class="gosign-googlemaps" style="min-height:350px" data-lat="<redacted>" data-lng="<redacted>" data-zoom="17" data-show-zoom-buttons="true" data-show-map-type-buttons="true" data-show-street-view-button="true" data-show-fullscreen-button="true" data-option-scroll-wheel="true" data-option-draggable="true" data-styles="[{"featureType":"administrative","elementType":"all","stylers":[{"visibility":"on"},{"lightness":33}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2e5d4"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#c5dac6"}]},{"featureType":"poi.park","elementType":"labels","stylers":[{"visibility":"on"},{"lightness":20}]},{"featureType":"road","elementType":"all","stylers":[{"lightness":20}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#c5c6c6"}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#e4d7c6"}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#fbfaf7"}]},{"featureType":"water","elementType":"all","stylers":[{"visibility":"on"},{"color":"#acbcc9"}]}]" data-gesture-handling="cooperative"><div class="gosign-googlemaps-marker" data-lat="<redacted>" data-lng="<redacted>" data-address="<redacted>" data-iconurl="https://<redacted>/app/uploads/2022/01/Icon.min_.svg" data-markerwidth="27"></div></div>
Content retrieved from post body: <pre><code>
<div class="gosign-googlemaps" style="min-height:350px" data-lat="<redacted>" data-lng="<redacted>" data-zoom="17" data-show-zoom-buttons="true" data-show-map-type-buttons="true" data-show-street-view-button="true" data-show-fullscreen-button="true" data-option-scroll-wheel="true" data-option-draggable="true" data-styles="[{"featureType":"administrative","elementType":"all","stylers":[{"visibility":"on"},{"lightness":33}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2e5d4"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#c5dac6"}]},{"featureType":"poi.park","elementType":"labels","stylers":[{"visibility":"on"},{"lightness":20}]},{"featureType":"road","elementType":"all","stylers":[{"lightness":20}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#c5c6c6"}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#e4d7c6"}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#fbfaf7"}]},{"featureType":"water","elementType":"all","stylers":[{"visibility":"on"},{"color":"#acbcc9"}]}]" data-gesture-handling="cooperative"><div class="gosign-googlemaps-marker" data-lat="<redacted>" data-lng="<redacted>" data-address="<redacted>" data-iconurl="https://<redacted>/app/uploads/2022/01/Icon.min_.svg" data-markerwidth="27" data-markerheight="NaN"></div></div>
`
The height of the marker icon is
NaN
in the markup to save, while it is not in the post markup. So some value is not passed around correctly.
- The topic ‘Block error when loading (SVG marker icon)’ is closed to new replies.