Skip to content
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

ensure unique tab ids #12939

Merged
merged 2 commits into from
Mar 21, 2023
Merged

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Mar 21, 2023

Description

Craft 4 allows you to have multiple tabs with the same name (in Craft 3, they were merged into one). I assume this is because of the conditions where you could have 2 tabs with the same name showing under different circumstances.

However, when no conditions are defined for the tabs, and you have at least 2 with the same name, only the first one will show when editing an element due to having the same ID.

This PR ensures tab ID is always unique, even if the name is not, by adding sort order (padded with zero), so what used to be tab--content now becomes, e.g. tab02--content.

Related issues

#12928

@i-just i-just requested a review from a team as a code owner March 21, 2023 08:12
[ci skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants