Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Error message: Invalid argument in taxonomy.module

Parent Feed: 

Recently we had the following error message on the site:

warning: Invalid argument supplied for foreach in taxonomy.module...

So what's the problem. The node variables seems to be empty so
this fails. So the main question is way is this variable empty here.

After short debugging it was possible find out that the uid of the node table is not existant. This happened because the user table was changed. Once you have this node_load fails. This is quite a wtf.

To fix this you have to

  • Find out the nodes without an author:

    SELECT n.nid FROM {node} n LEFT JOIN {users} u ON u.uid = n.uid WHERE u.uid IS NULL;
  • Set a author for this node:

    UPDATE {node} SET uid = 3 WHERE nid = 123;

Once you have this the problem will go away.

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web