Problem/Motivation
Markers with an externalGraphic
defined don't show up if you've enabled language prefixes for urls.
Currently openlayers_style_path()
uses url()
to get the file-url, but unfortunately this function adds a language prefix if these prefixes are enabled.
This makes the returned url useless for our purpose.
The function openlayers_style_path()
was introduced by #1127498: Variable styling syntax being urlencoded for externalGraphics links (Commit: b48585aca7dda5c480832942551aa7b5a02620d7), but the usage of url()
was already introduced by #854552: Support Drupal paths for style graphics (Commit: 025bb538f9397eb96f805425fc047c67c7f77027)
Proposed resolution
Handover a fake $language object to avoid adding a prefix.
As mentioned by nod_ in #1 file_create_url()
looks like the correct approach!
Remaining tasks
Review latest patch: #2
User interface changes
none.
API changes
none.
Comments
Comment #0.0
das-peter CreditAttribution: das-peter commentedUpdated issue summary.
Comment #1
nod_In my case the use of
url()
breaks images when clean urls are off. Should switch tofile_create_url()
or something.Comment #1.0
nod_Updated issue summary.
Comment #2
das-peter CreditAttribution: das-peter commentedThanks to nod_ for the discussion via IRC.
I've created a patch that uses
file_create_url()
now.Comment #2.0
das-peter CreditAttribution: das-peter commentedUpdated issue summary.
Comment #3
nod_Sweet, works well. I'll let zzolo handle committing.
Comment #4
nod_For information, whitespace fix is now useless since all excessive whitespace was removed a little while after the patches were sent.
Comment #5
nod_Thank you :D
Comment #7
valderama CreditAttribution: valderama commentedpatch works!
Comment #7.0
valderama CreditAttribution: valderama commentedUpdated issue summary.