Active
Project:
Content Taxonomy
Version:
6.x-1.0-rc2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Mar 2009 at 18:29 UTC
Updated:
10 Oct 2010 at 16:22 UTC
In beta6 things were changed so that only the terms managed by content_taxonomy were removed from the standard 'vocabularies' fieldset. If all terms are managed, we end up with an empty fieldset right now, so why not unset it if there are no more terms inside? Something like this at the end of content_taxonomy_form_alter?...
$empty = TRUE;
foreach ($form['taxonomy'] as $key => &$value) {
if (is_array($value) && !empty($value)) {
$empty = FALSE;
}
}
if($empty) unset($form['taxonomy']);
Comments
Comment #1
mh86 commentedHi!
I added the code to the form_alter implementation. So this case is fixed :)
thanks!
Comment #2
markus_petrux commentedhmm... it seems that a
break;could be added to exit the loop after$empty_fieldset = FALSE;?Comment #4
geaseIf there remains only 1 item in taxonomy fieldset, managed by core taxonomy, the embracing fieldset should be removed as well - consistent with core taxonomy behaviour.