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.

Files: 
CommentFileSizeAuthor
#2 openlayers_style_path-must-not-use-language-prefixes-1364778-2.patch618 bytesdas-peter
PASSED: [[SimpleTest]]: [MySQL] 236 pass(es).
[ View ]
#2 openlayers_style_path-must-not-use-language-prefixes-and-whitespaces-1364778-2.patch4.07 KBdas-peter
PASSED: [[SimpleTest]]: [MySQL] 236 pass(es).
[ View ]
openlayers_style_path-must-not-use-language-prefixes.patch1.15 KBdas-peter
PASSED: [[SimpleTest]]: [MySQL] 236 pass(es).
[ View ]
openlayers_style_path-must-not-use-language-prefixes-and-whitespaces.patch4.64 KBdas-peter
PASSED: [[SimpleTest]]: [MySQL] 236 pass(es).
[ View ]

Comments

Issue summary:View changes

Updated issue summary.

In my case the use of url() breaks images when clean urls are off. Should switch to file_create_url() or something.

Issue summary:View changes

Updated issue summary.

Title:openlayers_style_path() must not use language prefixes in returned url.openlayers_style_path() must not use url() to create file paths.
StatusFileSize
new4.07 KB
PASSED: [[SimpleTest]]: [MySQL] 236 pass(es).
[ View ]
new618 bytes
PASSED: [[SimpleTest]]: [MySQL] 236 pass(es).
[ View ]

Thanks to nod_ for the discussion via IRC.
I've created a patch that uses file_create_url() now.

Issue summary:View changes

Updated issue summary.

Status:Needs review» Reviewed & tested by the community

Sweet, works well. I'll let zzolo handle committing.

For information, whitespace fix is now useless since all excessive whitespace was removed a little while after the patches were sent.

Status:Reviewed & tested by the community» Fixed

Thank you :D

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

patch works!

Issue summary:View changes

Updated issue summary.