I'm getting the error "Request for invalid marker set drupal" whenever I attempt to edit a node that uses getlocation fields. On the Get Locations config page, the marker selections are all blank.
I'm running Drupal v7.15.
So far I've:
- Made sure that sites/all/modules/libraries/getlocations/markers contains the following folders: 0_to_99, a_to_z, big, colors, days, flat & misc small (which all contain .pngs)
- Clicked "Regenerate" since then
- Cleared my browser and server caches
- Uninstalled & reinstalled getlocations
How else can I troubleshoot this problem?
For what it's worth, I first ran into this several weeks ago with the previous version then the dev version. I set it aside for about 2 weeks and installed the lastest release today, but am still getting the same error.
Comments
Comment #1
hutch commentedWhen you click on "Regenerate" what happens (or should happen) is that a file is created: in "files/js/getlocations_markers.js". Check that the file permissions are right and that the file exists. It sounds like that is not the case at the moment.
Comment #2
aaronmacy commentedThank you for the prompt response.
I did have "sites/default/files/js/getlocations_markers.js". I set the permissions to 755 for the "file" and "js" directories as well as for getlocations_markers.js and gmap_markers.js. Cleared all caches, clicked "Regenerate." Unfortunately, the issue hasn't been resolved...
Comment #3
hutch commentedThey need to be 777 for the folders and 666 for the files, the files are written by the process running the webserver.
Comment #4
sportel commentedI also have this problem. I did set the permissions for the folders to 777 and for the files 666. Then, when clicking on "Regenerate", I get the "Marker cache regenerated" notification, so thats ok. Then, when checking the file permissions again, the permissions for the getlocations_markers.js file have changed to 664.
And, still getting the warning "Request for invalid marker drupal".
Any ideas?
Thanks,
Mike.
Comment #5
hutch commented664 should be OK, it means that the file is readable by anyone. If you can see the timestamp, make a note of it, run cron (or flush cache) and look again. If the timestamp has changed then it is updating. Next thing to consider is wether the file has any reasonable size, if it is just a few hundred bytes and you have say more than say 50 markers then I would suspect that it is writing it but it's almost empty. If you can download it have a look, it should have all the names of your markers in it. Don't upload!
Check the drupal logs, if regeneration fails it should say so.
Failing all these tests if is likely that some other javascript is interfering or icons.js is not loaded.
Finally, switch off Markermanager, flush cache and try again.
Markerclusterer is much better.
Comment #6
aaronmacy commentedI changed permissions as specified. Still not working, though.
Timestamp on getlocations_marker.js IS updating when cron is run. But it's almost empty:
Comment #7
hutch commentedSo it's not finding the markers. They should be in libraries/getlocations/markers/*
Comment #8
atxajon commentedI have the same issue. My getlocations_markers.js is on sites/default/files/js/ , and I have markers (like "red.png") on sites/all/libraries/getlocations/markers/. The content of the getlocations_markers.js file is:
I click on "Regenerate", I get the "Marker cache regenerated" notification. But when I try to create a node it says "Request for invalid marker set drupal".
Comment #9
hutch commentedEach set of markers would be contained in a subfolder of sites/all/libraries/getlocations/markers/ eg
big
colors
days
flat
misc
small
These are the standard ones found in getlocations-markers.tar.gz
Each folder contains the markers and a .ini file which contains sizes, positioning, shadow info etc
It is the .ini file that provides the information needed to build the getlocations_markers.js
You can do your own markers but you will need to put them in a folder and create a .ini file of the same name with the definitions in them for each marker. Use one of the existing ones as an example.
See the project page and the README for more information.
Comment #10
aaronmacy commentedahh the markers folder was in the wrong location: sites/all/modules/libraries/getlocations/markers
should have been: sites/all/libraries/getlocations/markers
thanks for your help!
Comment #11
hutch commented"sites/all/modules/libraries" is where the libraries module goes.
"sites/all/libraries" is the main place that the libraries module looks for stuff to provide.
Module developers wanting to provide their own markers can do so like this:
Comment #12
atxajon commentedThe path to the markers was wrong. It's fixed now, thanks for helping out.
Comment #13
Barry Tielkes commentedI have the same issue. The fire bug console says there is a error
"TypeError: q is undefined"
"for (var i = 0; i < q.sequence.length; i++) {" in "icons.js" (line 56)
Any ideas?
Comment #14
hutch commentedicons.js cannot find your markers.
Upgrade to the most recent stable version of Getlocations.
Ensure that you have markers installed as per instructions on the project page.
Regenerate the marker cache on the admin/config/services/getlocations page.
Check that the markers appear in the dropdown(s) on that page. If they do not you have not installed them correctly.
Flush the cache.
Check again.
Comment #15
Barry Tielkes commentedI updated to the latest version. cleared cache, regenerated the marker cache. But still got the error.
But the error was only on the edit pages of a location. So i changed the 'Getlocations Field' > "Input form Map marker" to green. (green blank) the same that i use on the normal location page.
So some how only a part of my markers where found.
Thx for the help!
Comment #16
dewolfe001 commentedI found that the update to 7.x-1.7 resolved the problems for me. What I also found-- it didn't give me configs for my content-type in 7.x-1.6, but it works fine in 7.x-1.7.
My suggestion: try the updated module.
All the best,
Shawn
Comment #17
hutch commentedComment #18
mfhussain commentedHi,
Our site was working fine. We have migrated to new server. Markers do not appear on the maps.
We get these errors: "No markers found, you need to install some markers, please see the project page for details." after regenerate of Getlocations marker Cache" we get this error -
"Request for invalid marker set drupal". The paths for js files are all correct it still runs ong the old server. I tried changing the permissions for all the getlocations folders and js, ini files but didn't work. We are using Leaflet extension module in Getlocations..
appreciate your advice.
Thanks,
Farooq
Comment #19
hutch commentedThe message "Request for invalid marker set drupal" is occuring because no marker has been found.
Markers should be located at sites/all/libraries/getlocations/markers/
eg sites/all/libraries/getlocations/markers/colors/ , sites/all/libraries/getlocations/markers/big/ etc.
Please note that this path is *not* the same as sites/all/modules/libraries/getlocations/markers/ which is incorrect.
Also make sure you have installed the Libraries module.
The generated file will be in sites/default/files/getlocations/getlocations_markers.js
If this file is not present or is being prevented from being written then you need to set the perms on the "files" folder and those inside it. How you do that depends on how good your access is, if you have ssh access and root (or sudo) then cd to sites/default and run
chown -R www-data:www-data files
This assumes that "www-data" is the user running the Apache webserver.
The permissions should be 755 for directories and 644 for files (or 775 and 664) and flushing the cache will not do any harm.
As this is a migration it's likely that the problem lies with the perms on "files"
Comment #20
mfhussain commentedThanks Hutch.. I have checked the paths, I am trying with the permissions but still no luck, I was getting the marker cluster but no markers, I raised that in another thread. We have migrated to managed server, I am not sure if the "www-data" is the user, will check.. thanks
Comment #21
mfhussain commentedHutch, changed the permissions.. as our server is managed by godaddy, the support says, the apache webserver user cannot be changed to "www-data" we have to manage with our specifc user.. any ideas please..
thanks
Comment #22
hutch commentedIt may be that on a "managed" server the owner issue does not arise, The question is not "can you change the owner to www-data" but "can the files in /sites/default/files be se to be writable by the owner of the webserver" (which needs to be able to write, any files uploaded or created by drupal will be owned by that user. It may be that this is not an issue and that the files in "files" are writable by the user that uploaded the files using ftp (which is probably the case). I do not use VPS servers myself having always used dedicated boxes so you will need to find out what your use-case is.
Comment #23
mfhussain commentedHi Hutch,
I checked the files and found that the file getlocations_markers.js had no code about marker files (blue.png, shadow.png etc) nor the reference to big.ini etc. It just had a series of [20],[21],[22],[23]],[0],[0],[0],[0],[0]],[[],[],[],[],[],[],[],[],[],[],[],[],[],[]]]]}.
Now when I overwrote this file with a working file from the old server, refreshed and then clicked on 'Regenerate Marker', the getlocations_markers.js file changes its code back to the series of numbers and brackets only, the references to big.in and the marker image files were deleted and no markers were generated. Couldn't figure out what's happening..
Comment #24
hutch commentedOK, we can see that your ability to write to "files" is there, what is missing is the markers, or they are in the wrong place or not being found for some reason.
Are there any markers on paths like these?
sites/all/libraries/getlocations/markers/big/
sites/all/libraries/getlocations/markers/colors/
Have you got the Libraries module installed?
Have you upgraded to version getlocations-7.x-1.12?
Comment #25
mfhussain commentedsites/all/libraries/getlocations/markers/big/ : Yes markers exist here
sites/all/libraries/getlocations/markers/colors/ : No /colors folder
Libraries module installed? : Yes
Version of getlocations-7.x-1.12? : No I am using 7.x-1.12.
Thanks for the prompt response.
Comment #26
mfhussain commentedNo I am using 7.x-1.10
Comment #27
hutch commentedTry upgrading to getlocations-7.x-1.12 and flush cache, at least once.
Comment #28
mfhussain commentedHutch, discovered warnings like:
Warning: parse_ini_file() has been disabled for security reasons in _getlocations_get_marker_titles() (line 240 of /var/www/vhosts/xxxxxxx.com/public_html/sites/all/modules/getlocations/getlocations.markerinfo.inc).
Warning: Invalid argument supplied for foreach() in _getlocations_get_marker_titles() (line 258 of /var/www/vhosts/xxxxxxx.com/public_html/sites/all/modules/getlocations/getlocations.markerinfo.inc).
This maybe preventing loading of markers..
Comment #29
hutch commented"Warning: parse_ini_file() has been disabled for security reasons......"
Ouch.
I doubt that there will be much you can do about that on a vps.
What you can do is:
1) Use a recent version of Getlocations.
2) Disable regeneration on the cron which you can do on admin/config/services/getlocations
3) Make a file getlocations_markers.js that does work elsewhere and upload it to
sites/default/files/getlocations/getlocations_markers.js
If you make the file read-only it will probably survive an (accidental) attempt to regenerate.
Comment #30
mfhussain commentedResolved! Got a hint from one of the threads, asked the host admin to enaable the function parse_ini_file() and it works like a charm.
Cheers to Drupal community.
Hutch, thanks for your promptness in responding, I wouldn't get that in paid support :)
mf
Comment #31
hutch commentedGood to know that your vps admin was willing to make the adjustment.
I don't know which method they use to disallow parse_ini_file() or why, but I can guess that the method used is the "disable_functions" PHP directive and the reason is to prevent access to php.ini which on some vps systems might belong to the user.
So just to be sure your server does not get hosed make sure that only you have access to the php filter under text formats or don't enable it at all if you don't really need it.
Just my 2 bits worth from an old Linux hand.
Comment #32
redhatusr commented0. fresh install latest drupal 7
1. drush dl getdirections
2. drush en getdirections getdirections_fields
3. cd sites/all/libraries/
4. mkdir -m 777 getlocations/markers/ -p
5. cd getlocations/markers/
6. wget https://dl.dropboxusercontent.com/u/41489105/Drupal/getlocations/getloca...
go to admin/config/services/getlocations
I get "Request for invalid marker set drupal"
I press Regenerate"
I get "Request for invalid marker set drupal" again
what am I doing it wrong?
Comment #33
hutch commentedYou haven't unpacked the tar.gz file and its in the wrong place anyway.
try it this way, assuming you have already installed getlocations and have the folder "sites/all/libraries"
cd your/drupal/root
This installs the basic set of markers
to install any other sets manually, eg the "extra" set:
cd sites/all/libraries
wget https://dl.dropboxusercontent.com/u/41489105/Drupal/getlocations/getloca...
tar -zxf getlocations-markers-extra.tar.gz
Hint: if you like working on the command-line, install "mc" (Midnight Commander), it will make your life easier and teach you at the same time.
Comment #34
fdefeyter@gmail.com commentedThanks hutch! Your'e the one :-)