warning: Invalid argument supplied for foreach() in E:\inetpub\drupal\modules\taxonomy.module on line 1292.

I'm receiving the error message above -- where and when it appears isn't clear yet...

I just upgraded from 4.6.x to the latest 4.7 version and have updated the database ONCE....

Comments

heine’s picture

1. Are you using taxonomy_defaults?
2. Can you reconfigure taxonomy_defaults, then see if the error persists?
3. If so, please disable taxonomy_defaults and check again.
4. Can you tell me a bit more about the taxonomy where taxonomy_defaults has problems with? Layout, etc.

angelahoistion’s picture

I meant to clarify in my original post that this error was to be w/ taxonomy.module...this option doesn't appear in the bug list...I don't have taxonomy defaults installed

heine’s picture

Project: Taxonomy Defaults » Drupal core
Version: 4.7.x-1.x-dev » 4.7.3
Component: Code » taxonomy.module
Priority: Critical » Normal

thanks

ergophobe’s picture

Same problem here after upgrading to 4.7.3. I can add a bit more info.

First, because I had flexinodes, my upgrade to 4.7 with CCK was a bit messy and there may be some problem I created in taxonomy system. I'm not sure that this would happen otherwise. Anyway, here's what's happening.

-when the rss.xml "page" is generated, the warning gets issued. It happens when I visit a single-node page, but not when I visit the front page.

- I put in a print_r($node->taxonomy, true) statement right above line 1292 to see what I would get and that didn't yield anything useful, so I did a print_r($node, true) and basically this is what I got
- the node that I'm viewing is fine and the $node->taxonomy property has an array with a single element as expected

[taxonomy] => Array
(
[5] => stdClass Object
(
[tid] => 5
[vid] => 1
[name] =>Category Name 5
[description] =>Category Description 5
[weight] => 0
)
)

Now here's the part I didn't expect

1. There are several instances of almost empty teasers or something. They look like this

stdClass Object
(
[readmore] =>
[teaser] => n/a
)

2. Several instances of objects containing entire nodes, like the node I'm looking at. In other words, all the info for various nodes that have nothing to do with the one that I'm actually viewing. Not sure why those are being generated every time I look at any node.

Anyway, given all that, I'm guessing that this is being caused by some data problem. Haven't figured out yet whether or not it's caused by some peculiar thing that is not getting upgraded properly by the upgrade script, or something related to my handling of the flexinode data. If I figure it out, I'll post a follow-up

ergophobe’s picture

Wait a minute... This makes more sense. I was mixing up my Firefox tabs and getting confused by all the print_r output.

This happens on the front page, not the single-node page so that makes a lot more sense and should be easier to figure out. Sorry for the confusion

ergophobe’s picture

Okay, it was my fault as during the conversion of flexinode nodes, I did not update the term_node table.

That doesn't really help explain the orginal poster's issue, but I wonder whether this is a really a bug. It would be nice to have some more details on the OP's setup.

angelahoistion’s picture

Status: Active » Closed (fixed)

I ended up rolling my upgrade back to 4.6 due to upgrade issues....perhaps I'll try again at some later time...I too think that I had some upgrade issues with tables