Closed (fixed)
Project:
Location
Version:
5.x-3.1-rc1
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
9 Oct 2008 at 15:49 UTC
Updated:
15 Apr 2009 at 07:09 UTC
Jump to comment: Most recent file
I'm getting an error when I preview my nodes.
warning: Invalid argument supplied for foreach() in MYURL/sites/all/modules/location/location.module on line 1677.
...it may be unrelated, but I noticed this warning after I just installed a newly patched version of WYSIWYG, here: http://drupal.org/node/253600#comment-1050339
(in case it's relevant at all - though could be unrelated ?)
Thanks for any insight into this issue :)
Scott
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | location_no_locative_info.patch | 817 bytes | claudiu.cristea |
Comments
Comment #1
scottrigbyBTW, Just checked with sun and apparently the function on line 1677 isn't related to the WYSIWYG module in any way.
Also, for the node-type in question, there Locations aren't enabled at all, so I assume this should not be an issue - but for some reason it is.
Any ideas? How can I help track this down?
Cheers :)
Scott
Comment #2
DerTobi75 commentedSame here, but I am using the Drupal 5.x version. Every node that does not have locationfields create that warning!
Comment #3
TallDavid commentedI have also started seeing this error in the log after updating a Drupal 5.11 site to location 5.x-3.0-rc1.
Comment #4
bdragon commentedI can confirm this on my test site. I believe it's related to invalid data, but I haven't had time to debug.
Comment #5
bdragon commentedLooking into this now.
Comment #6
bdragon commentedoh, I get it. Yeah, location's trying to run on all nodes and not double checking a couple things.
Should be fixed in HEAD and DRUPAL-5--3 now.
http://drupal.org/cvs?commit=148367
http://drupal.org/cvs?commit=148369
Comment #7
MedicSean37 commentedI have this issue on D6.5. It doesn't occur all the time, and it did happen with a content type that doesn't even use the location module. I did upgrade from D5 which I used the location module then too.
I'll upgrade to head soon and report back.
Comment #8
dynamite commentedHi,
What does this line mean?
"Should be fixed in HEAD and DRUPAL-5--3 now."
Is there a way to find a patch for the fix so that we can apply it to 5.x-3.0-rc1? I'm having issues with rc2, so I resorted to rc1. Please kindly let me know.
Thanks!
Comment #9
femrich commentedI get this for 5.x-3.0.rc2 when creating new content:
According to what I read above, this should already have been fixed in this version, no? Or do I need to upgrade to Head?
Comment #10
dynamite commentedHi femrich,
You can try the latest dev version. It solved the problem for me, but the search proximity filter is broken in the latest dev version. sigh...
Comment #11
femrich commentedThanks, dynamite, though I can't see that substituting a version with one bug with a dev version with another bug qualifies an issue as "fixed." It's gone on long enough for me that I will simply uninstall the module until the next RC or official release, and then test that one.
Comment #12
skizzo commentedOn 5.x-3.0-rc2 I am seeing this error when entering data in a CCK location field and then hitting the Return key. However, if I click the Submit button (instead of Enter key), then I see no error and location gets geocoded correctly.
Comment #13
femrich commentedFor me it happens also when I click "submit."
Comment #14
amcc commentedwarning: Invalid argument supplied for foreach() in blah/all/modules/location/location.module on line 1750.
Get this when creating a new forum topic, when logged in as an authenticated user, but not admin.
Somehow the location variable is getting into the form topic
line 1750 below in location.module - this is causing the trouble for me
I've not added locations to forum topics - i've tried installing then reinstalling the forum module - additionally nothing is being themed in forum topics.
Authenticated users have permissions to do the following under location module:
set own user location
submit latitude/longitude
view all user locations
view own user location
Comment #15
amcc commentedModifying location.module like this fixes the adding forum posts problem described above, not sure if it breaks anything else important, don't think it will.
Rather than modifying the location.module file itself you should be able to do this in the theme i believe, eg zen_preprocess_locations, but this isn't working for me, and there's a long issue about that here: http://drupal.org/node/258089
Either way this shouldn't be happening in the first place. This also fixes the problem (added an if statement to check for the $locs variable - perhaps this is more appropriate:
Comment #16
jannalexx commentedv6.6
warning: Invalid argument supplied for foreach() in \location.module on line 1677 (rc2) / on line 1750 (rc3)
#15 works (1st solution) at least the error disappeared
there should be a 6.7 fix (for 2nd solution) as stated in http://drupal.org/node/258089
but it should be in the module code for now
Comment #17
claudiu.cristeaHere's a patch for 5.x-3.0-rc2. The error is fired up from
location_nodeapi().Comment #18
claudiu.cristeaChanged also the status....
Comment #19
sComm commentedIs this resolved in 5.15?
Comment #20
TallDavid commentedThis problem no longer occurs with the latest version 5.x-3.1-rc1 2009-Mar-03 on my site. I believe that the problem has been resolved and am therefore marking this ticket as fixed.
Comment #22
yesct commentedmarked #336693: Invalid argument supplied for foreach() in location.module on line 1750. as a duplicate of this issue.