Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In some cases, $item['tid'] can be NULL, just needs a check for !empty(). Patch via chx with minor modification from me.
Comment | File | Size | Author |
---|---|---|---|
#2 | term.patch | 867 bytes | catch |
term.patch | 866 bytes | catch | |
Comments
Comment #2
catch*whistles*
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedVerified and validated.
Comment #4
webchickThis means we're missing test coverage for whatever chunk calls this code. Suggestions?
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedHmm.. When does this happen? I think it happens when the term referenced by the field value has been deleted.
Does the test need to create entities that refer to the term, delete the term and then attempt to render these entities?
Comment #6
chx CreditAttribution: chx commentedYou need to set the parent to a nonexisting tid in the field definition.
Comment #7
marthinal CreditAttribution: marthinal commentedterm.patch queued for re-testing.