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.
So, I've been beating my head against a wall trying to get a custom markers implementation working. Per advice that I received on this issue queue, I have placed the markers in the sites/default/files folder, and attempted to map the absolute path to the markers. The markers wouldn't show. However, when I place the markers in a folder at the root of the OpenLayers module folder, the marker shows up, no problem. I know this is bad practice, because the markers will get wiped out on the next module update, so why does this happen?
Comments
Comment #2
m.stentaMaybe check the file permissions? Are they readable by Apache?
Comment #3
Nkendall CreditAttribution: Nkendall commentedIm working on windows acguia dev desktop, so permissions shouldnt be an issue, right? The rest of the files and folders in the sites/default/files show up, so I dont think thats the issue. Ill look at that on my live test server tomorrow.
Comment #4
m.stentaIf you load the image file in a separate tab, does it work?
Open up the Network tab of Chrome Dev Tools - is it the correct file being requested? What response code is the resource returning?
Is the path relative when it should be absolute, or vice versa?
The fact that it works when the files are in the Openlayers module folder suggests something to do with the filesystem or the request being made. Something's off.
Comment #5
Nkendall CreditAttribution: Nkendall commentedHi, I can show the marker in a separate tab in the default/files folder, so it's not a permissions thing. Completely inexplicably, I switched the path back from within the OL module folder to the files folder and the marker showed up. I tested another marker, and it showed up as well. I guess we can close this, but it makes no sense why it wouldn't show up before. boogles the mind.
Comment #6
Nkendall CreditAttribution: Nkendall commented