Bug description
If you add a taxonomy term field to a blueprint and limit it to a max of 1 term, then it will show the wrong label on dropdown and typeahead UI modes. It will show something like tags::bob instead of Bob.
How to reproduce
- Create a new taxonomy "Tags" associated with the collection "Pages."
- Add a taxonomy terms field to your Page blueprint if it was not created for you automatically.
- Make sure this field is limited to a max of 1 term and using the dropdown UI mode. Save the blueprint.
- Go to a Page entry and add the term "Bob" to your record. This will create a new term "Bob".
- Use Command-S to save your entry. Watch the term field. It will transform to "tags::bob".
Environment
Environment
Laravel Version: 13.6.0
PHP Version: 8.3.31
Composer Version: 2.9.5
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file
Storage
public/storage: NOT LINKED
Statamic
Addons: 3
License Key: Not set
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.18.0 PRO
Statamic Addons
tenseg/cascading-entry-protection: dev-main
tenseg/zone-date: dev-main
transformstudios/events: 6.0.1
Installation
Fresh statamic/statamic site via CLI
Additional details
This error can be fleeting when set up as described above. The system will display the label properly upon a reload of the entry. However, the following setup will never recover the correct label.
First complete the scenario above. Then...
- Create a collection "Stories".
- Add to the Story blueprint a grid, add to the grid a taxonomy term field that is limited to the "Tag" taxonomy and to a max of 1 term and using the dropdown UI mode, add to the grid a entries field to pick associated Page entries.
- Create a Story entry.
- Add a row to the grid and a new term to the taxonomy field by typing it out, let's say "Fred".
- Save your entry.
- Reload the Story entry's page.
When I go through this sequence, the label on the dropdown gets stuck as "tags::fred". This is a mistaken presentation that persists through reloads.
I cannot figure out why this happens, since the YAML for the tags and entries all looks good. It also only seems to occur when you are creating a new taxonomy entry from a dropdown or typeahead with a max of 1 term in a collection other than the one that was associated with the taxonomy. This is a very specific (but not unusual) case.
My workaround has been to use the stack UI, but I find that UI considerably more cumbersome and do wish I could rely on the dropdown instead.
Bug description
If you add a taxonomy term field to a blueprint and limit it to a max of 1 term, then it will show the wrong label on dropdown and typeahead UI modes. It will show something like
tags::bobinstead ofBob.How to reproduce
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
This error can be fleeting when set up as described above. The system will display the label properly upon a reload of the entry. However, the following setup will never recover the correct label.
First complete the scenario above. Then...
When I go through this sequence, the label on the dropdown gets stuck as "tags::fred". This is a mistaken presentation that persists through reloads.
I cannot figure out why this happens, since the YAML for the tags and entries all looks good. It also only seems to occur when you are creating a new taxonomy entry from a dropdown or typeahead with a max of 1 term in a collection other than the one that was associated with the taxonomy. This is a very specific (but not unusual) case.
My workaround has been to use the stack UI, but I find that UI considerably more cumbersome and do wish I could rely on the dropdown instead.