My Drupal installation has some warnings, I tried several patches, but none of them works for me. These are the warning messages:

Warning: Invalid argument supplied for foreach() in taxonomy_field_formatter_prepare_view() (line 1677 of modules/taxonomy/taxonomy.module).

Warning: Invalid argument supplied for foreach() in taxonomy_field_formatter_view() (line 1600 of modules/taxonomy/taxonomy.module).

It looks like I get those warnings randomly, I can't find a specific handling.

I think I get this message when I create/edit a node.

2 Answers 2


As per this post, this warning can be eliminated by editing the field on each file type which is having a field and unchecking Override in WYSIWYG (at /admin/structure/file-types). This happens because term reference doesn't support overridable in the WYSIWYG.

This issue at Drupal.org: #2062721: Add a white list of file fields that can be overwritten when the file is added in the wysiwyg, aiming to solve that issue. At time of writing, there is still some patch which is in Needs review status.


Actually it is using hook_field_formatter_prepare_view, it checks if the term which has been passed to it exists or not. So please check the term which are going through it, if it exists or not.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.