When I create a new node of a content type which has no associated vocabularies, I get the following error:

warning: Invalid argument supplied for foreach() in /home/sonomacr/public_html/knowsand/modules/taxonomy/taxonomy.module on line 1330.

(in Drupal 5.14; it was line 1329 in some earlier versions, same text)

This goes away if I disable this module.

The problem seems to be that function taxonomy_node_update_index is called with a $node which has no taxonomy member so $node->taxonomy does not return the expected array. I'm wondering if this module needs to test for whether the current node has any associated vocabulary before calling (something which calls) function taxonomy_node_update_index.

Comments

MarcElbichon’s picture

Assigned: Unassigned » MarcElbichon
MarcElbichon’s picture

Works for me.
Could you add this debug line

  watchdog("Before update index",print_r($node->taxonomy,true));

just after function taxonomy_node_update_index(&$node) { and post the result ?

Which kind of content do you try ?

developone’s picture

Hi,

I have been experiencing the same issue.

1. It happens when creating a new page
2. I added the watchdog line and it returns Array ( )

MarcElbichon’s picture

Does the node is associated with vocabularies and no value is set ?
In this case, could you send me all properties (required, free tagging, ....).
I can't reproduce the problem.

MarcElbichon’s picture

There's another module Instant Search which do the same work.
Can you test it.
AutoUpdateSearch will not be maintained if InstantSearch works.

MarcElbichon’s picture

Status: Active » Closed (fixed)