Hello,
I had xmlsitemap 6.x-2.0-alpha2 on one of my websites. Today, I updated to the latest dev of xml sitemap (2010-Apr-19) and installed domain xml sitemap.
Now, everytime cron runs, I get lots of these errors:
warning: Invalid argument supplied for foreach() in /home/.../sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module on line 332.
And the xmlsitemap is not there any more (error 404 when calling the page).
===
I have an older dev version of xml sitemap from the time I started testing domain xml sitemap:
from xmlsitemap.info
; $Id: xmlsitemap.info,v 1.2.2.4.2.21 2010/04/07 22:39:10 davereid Exp $
..
; Information added by drupal.org packaging script on 2010-04-08
version = "6.x-2.x-dev"
core = "6.x"
project = "xmlsitemap"
datestamp = "1270729799"I tested this version again and it does not have this problem. So the source of the error message must be something that you have done in one of your newer dev versions.
Well I switched to the old dev again for the time being...
Comments
Comment #1
dave reidThanks for reporting this. I actually could duplicate this from qa.drupal.org and I think I just fixed it in CVS. Please feel free to give it a try and report back if it is not fixed.
Comment #2
zuzu83 commentedsorry,
I have same preobleme after update 20 april
warning: Invalid argument supplied for foreach() in .../sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module on line 333.Comment #3
Anonymous (not verified) commentedDid you run update.php or at least clear your caches?
Comment #4
MJH commentedI can confirm that the problem is still there in 6.x-2.x-dev (2010-Apr-20).
I ran update.php and cleared my caches.
Interesting point: The error message now says that the problem is on line 333 (using the dev of 2010-Apr-19, it was on line 332).
Comment #5
dave reidHmm, I'm running the latest 6.x-2.x-dev now on my actual blog without problem. I can't confirm this. You might have to help me out by inserting some debugging statements around those lines to figure out what exactly is going wrong.
Comment #6
dave reidOk I found a bug in the node_access() function I copied. I committed a fix to CVS that should help clear things up.
http://drupal.org/cvs?commit=360748
I'll keep testing and re-open if anyone can reconfirm with more error details after the dev build is regenerated.
Comment #7
dave reidGAH. I found another bug. I'm very confident that I've actually fixed this for good now. I've do so much manual testing and I'm working on adding several tests to make sure I don't ever break this again.
Comment #8
srobert72 commented#783402: Won't Index Nodes or Taxonomy has been marked duplicate of this issue
Comment #9
skizzo commentedI just installed 6.x-2.x-dev (packaging script on 2010-04-29) plus domain_xmlsitemap 6.x-1.0-alpha1. I have enabled xmlsitemap_node only. Maps are ok, but I am seeing a bunch of repeated warnings (at line 333) on rebuild
warning: Invalid argument supplied for foreach() in /var/www/drupal/sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module on line 333.Comment #10
dave reid@skizzo: Can you add this line of code below line 327 in xmlsitemap_node.module:
drupal_set_message(var_export($grants[$account->uid][$op], TRUE));Please copy/paste the output of that message on your rebuilds here.
Comment #11
dave reidActually the better code to put in place would be the following around line 331 instead of the above change. Should be pretty clear what section of code this replaces in the file.
Comment #12
skizzo commentedHere you go... If needed, feel free to provide more debug instructions. Thank you.
the error page:
333: foreach ($grants[$account->uid][$op] as $realm => $gids) {
Comment #13
skizzo commentedAfter upgrading both xmlsitemap and domain_xmlsitemap to 6.x-2.0-beta1 I am not seeing the warning anymore. Thank you.
Comment #14
dave reid@skizzo: Woot, thanks for reporting back. :)