Node displays issue with Forums / Taxonomy?
When clicking "Preview button while editing a forum topic:

warning: Invalid argument supplied for foreach() in /xxxxx/modules/taxonomy/taxonomy.module on line 69.

Drupal 6.33
PHP 5.3.29

Probably has something to do with lines 145-151 of nd.module

       // Prepare taxonomy
        if (isset($node->taxonomy)) {
          foreach ($node->taxonomy as $tid => $term) {
            if (is_int($tid)) {
              $node->taxonomy[$tid] = db_fetch_object(db_query('SELECT * FROM {term_data} WHERE tid = %d', $tid));
            }
          }
        }

Maybe

isset($node->taxonomy)

Should be

!empty($node->taxonomy)

?

Comments

gumanov’s picture

Issue summary: View changes
gumanov’s picture

Issue summary: View changes
xtfer’s picture

Status: Active » Needs review

Thanks for you report. I am not doing any further development on Display Suite 6.x owing to its nearing end-of-life. You are welcome to submit patches.

However, I suspect that line should be

<?php
if (isset($node->taxonomy) && !empty($node->taxonomy) && is_array($node->taxonomy)) {
?>

Can you try that fix and let me know if it works? I don't currently have a testing suite set-up for this.

gumanov’s picture

I'll try this as soon as I get a chance.