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

lyricnz’s picture

Project: Drupal core » Frequently Asked Questions
Version: 6.x-dev » master
Component: taxonomy.module » Code

You're right - looks like an issue in FAQ module.

stella’s picture

Project: Frequently Asked Questions » Drupal core
Version: master » 6.x-dev
Component: Code » taxonomy.module

I 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

bennybobw’s picture

Project: Drupal core » Frequently Asked Questions
Version: 6.x-dev » 6.x-1.x-dev
Component: taxonomy.module » Code

If 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

stella’s picture

Assigned: Unassigned » stella
Status: Active » Fixed

Thanks 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

stella’s picture

Released in 6.x-1.1.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)