Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
After creating an article node and using the autocomplete tagging widget to add taxonomy terms, the terms are saved to the vocabulary.
However, when re-editing the node, the terms are not available on the node/edit page.
Furthermore, clicking save removes all of the terms from the node.
Comment | File | Size | Author |
---|---|---|---|
#13 | taxonomy-tests-1754070-13.patch | 2.08 KB | dcam |
#8 | taxonomy-1754070-8.patch | 2.66 KB | tim.plunkett |
#5 | taxonomy-1754070-5.patch | 2.65 KB | tim.plunkett |
#5 | interdiff.txt | 408 bytes | tim.plunkett |
#2 | taxonomy-1754070-2.patch | 2.26 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettHere is a test.
The bug is not in D7, but it could use the test coverage.
Comment #2
tim.plunkettHere's the save edit/save code for options_select which passes, proving that it's just the autocomplete that's broken
Comment #4
tim.plunkettAs this can easily cause data loss, this is sadly a critical.
Comment #5
tim.plunkettThis was broken by #1616972: Replace $term->name with $term->label().
Turns out it was a really easy fix!
Comment #6
tim.plunketttaxonomy_implode_tags() was switched from
if (isset($tag->name)) {
to
if ($tag instanceof EntityInterface && $label = $tag->label()) {
But without the use statement, the EntityInterface prevented any terms from being loaded.
Comment #8
tim.plunkettWhoops, should have been assertRaw.
Comment #9
dcam CreditAttribution: dcam commentedI can confirm #8 corrects the issue. Before applying it, if you entered tags into a term reference field, saved the node, and then edited it again, the field would be blank. After applying the patch, the tags appear correctly in the edit form.
Comment #10
BerdirRTBC +1. Fix makes sense and has tests. Backport tag is for the tests, the bug doesn't exist there.
Comment #11
Gábor HojtsyLooks good!
Comment #12
webchickWow, nice find. Glad we have test coverage for this embarrassing bug now.
Committed and pushed to 8.x. Thanks!
Moving to 7.x for backport of the tests, and reducing in priority as a result.
Comment #13
dcam CreditAttribution: dcam commentedBackported the tests from #8 to D7.
Comment #14
mgifford13: taxonomy-tests-1754070-13.patch queued for re-testing.
Comment #15
mgiffordAssuming this passes, I can't see why this wouldn't be RTBC.
Comment #17
dcam CreditAttribution: dcam commented13: taxonomy-tests-1754070-13.patch queued for re-testing.
Comment #18
dcam CreditAttribution: dcam commentedThat's yet another random test failure. >.>