warning: Invalid argument supplied for foreach() in xxxxxxxxxxxxxxxxxxxxxxx\sites\all\modules\active_tags\active_tags.module on line 61.

If you set a content taxonomy field attached to a tag vocabulary and this vocabulary is a community tag, then you get this error because the $form['taxonomy']['tags'] is empty.
In any other combination works fine:
-only vocabularies without content taxonomy fields (with and without active tags)
-a vocabulary with content taxonomy fields and other taxonomy with community tags (with any combination of active tags on them)

I attach a patch that check that this variable is not empty.

I guess that this check would be not not needed if you control the function but running in a form{'#after_build'], other modules are able to change the values of $form and this seems to be an issue between the content taxonomy that overrides any other taxonomy core behavior, and when content taxonomy is overriding a taxonomy with community tags so in some #pre_render that is what happens.

With this patch you don't get the error and the content taxonomy field with the community tag has all the active tags feature working fine (content taxonomy already set the wrapper and loaded the js)

CommentFileSizeAuthor
comtags_content_tax_error.patch744 bytesjcmarco

Comments

dragonwize’s picture

Status: Needs review » Closed (duplicate)