If there is a taxonomy field which is hidden for a certain display style, then taxonomy_field_formatter_view() throws an exception because the $items contain an element for each hidden taxonomy term but not the taxonomy terms themselves.

The attached patch is resolving that problem.

CommentFileSizeAuthor
#4 taxonomy_1467608.patch571 bytesfilijonka
taxonomy.patch411 bytesjurgenhaas

Comments

filijonka’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, taxonomy.patch, failed testing.

xjm’s picture

Could someone add explicit steps to reproduce this, starting from "Install Drupal 7.12 with the standard profile" or such? That will allow us to add a functional test for the issue. Thanks!

filijonka’s picture

Version: 7.12 » 7.x-dev
Status: Needs work » Needs review
Issue tags: -Needs tests, -Needs steps to reproduce
StatusFileSize
new571 bytes

redid it to a patch done with git

xjm’s picture

Thanks for the reroll @filijonka!

Adding back tags (which I think got missed in a crosspost).

ijf8090’s picture

Could not reproduce - would like to know if approach is incorrect.
(Worked w. DeliriousGuy on this)

Using Acquia Dev Desktop v7.12.12-5773-40585 for Mac OS X 10.7

Created two pieces of Basic Page content
Added two taxonomy fields to Basic Page structure
Set second taxonomy field to Hidden (on Display Tab)

Tagged Both pieces of content
Tag field 1 set to term1
Tag field 2 set to term2
Saved

Displayed both pieces of content - no error thrown?

idaniellau’s picture

taxonomy.patch queued for re-testing.

jurgenhaas’s picture

I'm really sorry that I can't reproduce this error today. I just remember that there have been other entities (i.e. users) that made use of the same fields as nodes and that this combination was causing the error. But it's gone by now and I can't get it reproduced.

dandaman’s picture

Status: Needs review » Closed (cannot reproduce)

Seems like we should change to "closed (cannot reproduce)" if a number of people have tried to reproduce this issue and have not been able to do so.