I am trying to: change the slug of a hierarchical taxonomy. The taxonomy was already in use in a single field block on a template, to pull the taxonomy name and show it as a link to the archive. Once I changed the slug, the single field block did not show anything anymore. Clearing the page cache did not help. All plugins are the latest version.
I added another identical single field block after this happened, and it works fine. The one that was there before I changed the slug is still broken. I'd expect the field to update if the taxonomy it pulls data from is changed.
Link to a page where the issue can be seen: hidden link
I expected to see: two identical taxonomy links under "Ticket type" (the old and new one)
Instead, I got: one taxonomy link under "Ticket type" (the new one)
Is this a bug or did I make a mistake? Thanks in advance!
The dynamic source of the single field block knows which taxonomy term to output based upon the taxonomy slug.
If you change the settings for the taxonomy to use a different slug then the original single field block will then be referring to something that no longer exists, and hence is broken.
Thank you for the quick response. For my understanding: so the slug is the unique ID in WordPress? Changing that requires a site wide search for affected fields to replace?
Or is it a choice made by Toolset to be dependent on the slug, and could this handled differently?
For my understanding: so the slug is the unique ID in WordPress?
Yes the slug is unique however it is not to be confused with the ID. Both ID and Slugs are unique identifier for wordpress.
Changing that requires a site wide search for affected fields to replace?
In most cases the change should be reflected given that the data would be pulled directly from the database. However there are cases where you will need to re-add the block in order for the correct information to be reflected after a change.
As Nigel mentioned If you change the settings for the taxonomy to use a different slug then the original single field block will then be referring to something that no longer exists, and hence is broken.
The recommendation here is to remove and re-add the affected block.