Closed (fixed)
Project:
Frequently Asked Questions
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
19 Sep 2007 at 12:16 UTC
Updated:
31 Oct 2007 at 10:11 UTC
Hi,
I get the following warning message for the taxonomy_node_type() function from the taxonomy module when I try to uninstall the faq module. I think this function may be called in core as a result of faq/faq.install calling node_type_delete().
notice: Trying to get property of non-object in /var/www/drupal_6.1_20070904/html/modules/taxonomy/taxonomy.module on line 602.
Cheers,
Stella
Comments
Comment #1
lyricnz commentedYou're right - looks like an issue in FAQ module.
Comment #2
stella commentedI disagree. The faq.install file doesn't even call this function. The problem is with the function taxonomy_node_type() in the taxonomy module. I *suspect* this function is being called somewhere in core because of the call to node_type_delete() by faq.install. The faq module triggers the call, but it's not the cause of this error. I know from looking at the api, that the node_type_delete() function is being called correctly by the faq module, so it's something wrong in core. I suspect the taxonomy module (since that's what the warning is produced for) but maybe it's a problem with the node module. I'm assigning it to the taxonomy module so you can determine whether it's a problem with the code in taxonomy_node_type() function or with the way that function is called somewhere in drupal core.
I hope that makes sense.
Cheers,
Stella
Comment #3
bennybobw commentedIf you look at the node_type table, after the module is disabled, the 'faq' nodetype is deleted (before it's uninstalled). That's why the call to node_type_delete() is returning this error.
This is because of how
_node_types_build() works.
And there's a reason.
See: http://api.drupal.org/api/function/_node_types_build/6
and
http://drupal.org/node/147061
Comment #4
stella commentedThanks a mill for figuring that out. I don't think I would have found that out by myself. I've removed the call to node_type_delete() and it seems to be working fine now. Thanks again.
Cheers,
Stella
Comment #5
stella commentedReleased in 6.x-1.1.
Cheers,
Stella
Comment #6
(not verified) commented