while trying to debug taxonomy ticker problem with not displaying terms in the admin i found that the problem really is with the core taxonomy.

please read my post and solution at the following link and implement the fix: http://drupal.org/node/117702

please implement this fix as i dont know how to submit patches yet.

thank you.

Comments

zonker’s picture

StatusFileSize
new520 bytes

Agreed - this is a really annoying problem with a very simple fix. I found the same problem in 4.7 and came up with much the same fix (before finding this issue node).

The issue is that taxonomy_form_all only returns categories which have two or more terms in them. This is clearly incorrect behaviour, and the function should return categories which also have just a single term.

Patch for 4.7 attached. The exact equivalent applies to 5.x.

Nick

RobRoy’s picture

Title: bug inside taxonomy_form_all() » taxonomy_form_all() doesn't show when there is one term
Version: 5.1 » 5.x-dev
Status: Active » Needs review
StatusFileSize
new827 bytes

Don't even need that in there. See http://us2.php.net/manual/en/language.types.boolean.php#language.types.b.... An empty array results in false and since taxonomy_get_tree always returns an array we can just do this. (We could do if ($tree = taxonomy_get_tree($vid))) but I like this better.

litwol’s picture

i do not agree with you. by some freak of nature bug $tree might become a positive number that will result this conditional statememt to evaluate to true. this is a potential door to another bug.

RobRoy’s picture

No. Heh, have you looked at taxonomy_get_tree()? It will always be an array. Trust me.

drumm’s picture

Status: Needs review » Closed (duplicate)