Postponed (maintainer needs more info)
Project:
XML sitemap
Version:
6.x-2.x-dev
Component:
xmlsitemap_node.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2010 at 00:39 UTC
Updated:
11 Apr 2011 at 13:42 UTC
Jump to comment: Most recent
Comments
Comment #1
dave reidThat would indicate something is passing it a very wrong value. It should never be getting NULL for $node.
Comment #2
beyond67 commentedIm getting the same error.
Comment #3
fugazi commentedsame Error
Comment #4
fugazi commentedI have to delete out § node. Please help. Thanks
Comment #5
Anonymous (not verified) commentedFind the module that isn't doing the right thing and report the bug there. It is a Drupal standard to not babysit broken code for other modules. The three reporters on this issue, what modules do you have in common? Take the common list, figure out which one is broken, fix it, then supply that module's issue queue a patch.
Comment #6
fugazi commentedSorry for my bad English
Argument 1 passed to xmlsitemap_node_nodeapi() must be an instance of stdClass, null given, called in .../modules/node/node.module on line 679 and defined in .../sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module in line 81.location ../node/5576/edit
Referrer ../node/5576/edit
It comes when a review is changed
Many Thanks
Comment #7
Anonymous (not verified) commentedSo what is causing the node variable to be NULL? To debug in modules/node/node.module add a is_null() condition before line 641 and throw an exception when $node is NULL. Then you'll have a traceback to other functions. The node_invoke_nodeapi function parameter states that the $node variable is to be a node object. It doesn't state that it should be allowed to be NULL.
Comment #8
fugazi commentedsorry I'm not a professional, what I write before line 641? Can you tell me please exactly. Perhaps the code to write down what I should add. Many many thanks. Sorry for my bad english
Comment #9
Anonymous (not verified) commentedI suggest you hire a professional then. Debugging requires someone who has a handle on what to do with the information collected. A good place to look for a professional is at http://drupal.org/drupal-services. You might also be interested in locating a user group near you by researching http://groups.drupal.org/groups.
Comment #10
neclimdulsame error.
I have a feeling it has to do with node_load being passed an invalid node somehow. Unfortunately, I think because node_invoke_nodeapi doesn't validate its arguments well enough, requiring a stdClass argument is not reasonable on xmlsitemap_node's part. Especially since it puts cron in a position where it can't progress without hacking the source of xmlsitemap_node on a live site...
Comment #11
neclimdulI should be clear up a couple things. First, I'm actually actively investigating this ATM. I have a snapshot of our broken production env prior to kicking it and I'm tracing through the problem.
Also, by node_invoke_nodeapi not being diligent enough in its argument validation, if I'm reading the code correctly,
node_load(-1);with xmlsitemap_node installed with cause the site to crash. This is because $node will be populated by the return of a database query which will return null. Then it is blindly passed into node_invoke_nodeapi which blindly passes it to to xmlsitemap_node_nodeapi() and then life sucks.And finally, I'm curious if anyone else running into this problem is running the apachesolr module. An initial quick review makes it look like it is causing the flub on our site.
Comment #12
neclimdulugh, nm it was an untested and suppose to not called code path. for some reason solr was indexing excluded nodes somehow.
And I was wrong about node_load, its node_save thats fragile about its calling of node_invoke_nodeapi(). But node_save(NULL) is much more likely a dev problem then node_load(invalid_nid);
Still node sure forcing the argument is a good idea in this case but my problem is fixed.
Comment #13
bryansd commentedI started seeing this error too after upgrading to 6.x-2.0-beta2. I'm now on the March 31, 2011 version of 6.x-2.x-dev. It appears during a cron run after files are being deleted via the FeedAPI module.
I'm a little unclear with the discussion provided whether this is an XML Sitemap issue or due to another module.
Comment #14
bryansd commentedI should have also added that this was during a normal cron run and not running cron within drush.
Comment #15
Anonymous (not verified) commentedI believe it to be a bug in feedapi. See #367111: Wrong use of node_save() and press the issue there.
Comment #16
steveedson commentedI've also just experienced this issue, and it wasn't because of a third party module. The item was added to the `queue` table, but had been deleted since the cron was ran.
So when the cron eventually starts, it gets to the item in the queue, can't load the node, and then bombs out with a fatal error. Can there be a simple check to make sure that
node_loaddoesn't return false before trying to use it?Thanks.