You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Updating term slug does not update references in entries #11021
When changing a term's slug, it should in theory update any references to that term across all entries. That's what the UpdateTermReferences subscriber looks to be doing, but it never happens.
The reason seems to be that $term->getOriginal('slug') always returns null and no listener can relate old to new slug on a term to do the updating. Unfortunately, this also makes it impossible to fix in user land.
This issue is related to #10938 but not quite the same issue, as the other one can be solved with a custom event listener and this one can't, at least not without touching vendor files.
How to reproduce
Create taxonomy tags
Create tags A, B, and C
Add terms field limited to tags to pages entry blueprint
Create an entry
Add tag C to entry
Save
Edit tag C
Change title to D and slug to d
Save
Check content/collections/pages/*.yaml
See that the tags field wasn't updated and is still pointing to c instead of d
@duncanmcclean Alright. I'd have preferred to close the other one, which is not that big a deal since an event listener can solve it in production. This one here will permanently break references in entries and practically prevents cp users from editing existing terms.
Activity
duncanmcclean commentedon Oct 28, 2024
This is the same root cause as #10938. To keep things tidy, I'm going to close this in favour of that one.
daun commentedon Oct 28, 2024
@duncanmcclean Alright. I'd have preferred to close the other one, which is not that big a deal since an event listener can solve it in production. This one here will permanently break references in entries and practically prevents cp users from editing existing terms.