-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.x]: Field layout deletes empty tabs on save #13132
Comments
This is currently working as intended. Why create a tab you’re intentionally leaving blank? |
If I am creating an entry type, I often create a bunch of blank tabs to scaffold how the entry type should look. If you instinctively save the entry type before populating the elements on the tab, those tabs disappear with no recourse. |
Yeah, there is some code in place that is intentionally removing unneeded tabs. We can discuss internally whether it makes sense to remove that. |
👍 There are some situations where you might expect this behavior. Like if the tab is preexisting and you remove all elements from it. I personally might lean towards having a double-confirm ("You are saving a field layout with blank tabs. Blank tabs will be removed. Continue?") Maybe not a common convention in Craft but somewhat similar to the popup when deleting a user. Avoids a potential jarring and frustrating UX with some warning to the user. |
I think if anything we would just stop removing them. It’s not a huge deal either way because blank tabs don’t get included in element editors (e.g. if all the fields within them are hidden due to conditions). |
Craft 4.5.0 is out with this change! |
What happened?
Description
When saving an entry type, tabs without elements are lost.
I often find myself creating a bunch of empty tabs to scaffold an entry type. It is frustrating that the tabs are irrecoverably lost.
Steps to reproduce
Expected behavior
Empty tab is not lost. This could mean that the tab shows a validation error ("Tabs must have at least one element.") or empty tabs are persisted without error.
Actual behavior
Empty tab is lost.
Craft CMS version
4.4.8
PHP version
8.2
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: