Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Attached patch try to detect if '$feat['icon']['iconUrl']' is a Drupal relative path, if yes, attach the site base_path()
Comment | File | Size | Author |
---|---|---|---|
#6 | leaflet-detect_relative_iconurl-2157851-6.patch | 845 bytes | jenlampton |
#5 | leaflet-detect_relative_url_marker-2157851-5.patch | 690 bytes | Perignon |
#1 | leaflet-relative-path-relative-url-2157851-1.patch | 1.47 KB | paolomainardi |
Comments
Comment #1
paolomainardi CreditAttribution: paolomainardi commentedComment #2
revagomes CreditAttribution: revagomes commented+1
Comment #3
paolomainardi CreditAttribution: paolomainardi commentedup
Comment #4
paolomainardi CreditAttribution: paolomainardi commentedFeedback ?
Comment #5
Perignon CreditAttribution: Perignon commentedThis needed to be rerolled against the current dev. There was a release on this module last month.
I also cleaned up the patch to only address the issue here. There were some formatting changes in the first page.
Putting to RTBC as this works and I made no changes to the code from the first patch.
Comment #6
jenlamptonAfter entering a relative URL for the marker icon
/sites/default/files/marker.svg
this patch made my markers disappear, as it added a second leading slash to the URL for the image://sites/default/files/marker.svg
.I've rerolled the patch to check if both
base_url()
and a relative path include a leading slash, and if so, not include them both.