Closed (fixed)
Project:
Openlayers
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2012 at 13:18 UTC
Updated:
26 Feb 2014 at 13:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
j0rd commentedI have the same problem.
@martin.riggs by any chance is your site a multi-lingual site?
It works fine for me when the language is set to the default language english.
Path example:
domain.tld/sites/all/modules/contrib/openlayers/theme/default_dark/img/marker-red.png
But when I switch the language to French, which uses a prefix folder, I get this path for the image which is a 404
domain.tld/fr/sites/all/modules/contrib/openlayers/theme/default_dark/img/marker-red.png
The /fr/ appears to be the problem. Most likely the Javscript used in this module isn't setting up the paths right. This might also be a problem for you if your Drupal is installed in a sub-folder I'm guessing
Comment #2
j0rd commentedAdding a better title.
Comment #3
j0rd commentedI've attached a patch, which adds base_url() to the externalGraphic paths.
@martin.riggs Please apply it and see if it works for you.
Comment #4
martin.riggs commentedThank, but please don't be mad on me, i never applied patches
could you guide me in few lines how to do it ?
i actually could follow the diffs by if there some better way i would like to know..
and thanks again...
Comment #5
j0rd commentedIf you've downloaded the module through git, you go into the module folder and `git apply -v PATCH.patch`
If you've simply downloaded the source, you do `cd sites/all/modules/openlayers; patch -p1 < PATCH.patch`
the `patch` command is with linux. If you're using mac or windows, you''ll have to do some reading for those OS's
Here's more information http://drupal.org/node/707484. Usually a quick google will solve these problems for you.
Comment #6
nod_I'd go with
file_create_url()instead ofbase_path(), it's the same issue we had with URL using ${dynamic}.Comment #7
nod_Actually, try this patch instead #1364778: openlayers_style_path() must not use url() to create file paths. and tell me if it fixes the problem.
Comment #8
RuiMendes commentedI worked thanks
Comment #9
nod_I'll commit the patch later, unless there is still an issue here.
Comment #10
martin.riggs commentedok, thanks, i will wait for your update, meanwhile i working with default style.
Comment #12
RuiMendes commentedSorry but this only works with clean urls.
If you can't use clean urls this patch won't work. It tries to get the image from:
localhost/?q=sites/all/modules/openlayers/themes/default_dark/img/marker-blue.png
the ?q= breaks the url.
Thanks
Comment #13
RuiMendes commentedupps forgot to reopen
Comment #14
nod_Does the patch in #7 fixes this ? I'm sorry haven't got around committing it yet.
Comment #15
RuiMendes commentedSorry. You are right.
I was using the old patch, the one that doesn't use the file_create_url()
Thanks.
Comment #16
jrogen commentedThis is still in the current versions over a year later. Can this be rolled in?
Comment #17
tobiasbThis happens also for file urls in layers etc.
Comment #18
tobiasbThis patch is for the current stable release.
Comment #19
tobiasb* Added "do-not-test" to filename.
Comment #20
polExcellent, committed and pushed!
Thank you very much !
Comment #23
pol