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

Bugfix/nested elements and revisions #15930

Merged
merged 6 commits into from
Oct 21, 2024

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Oct 21, 2024

Description

Issue 1:
When viewing a revision of an entry with a matrix field in cards or element index mode, double-click on the nested entry to open a slideout. Notice that the buttons at the bottom of the slideout say “Cancel” and “Save”. Clicking the “Save” button triggers an error.

Solution:
When viewing a nested entry that belongs to a revision, don’t show the “Save” button and change the wording of the “Cancel” button to “Close”.

Before:
Screenshot 2024-10-21 at 14 32 22

After:
Screenshot 2024-10-21 at 14 31 37

Issue 2:
When viewing a revision of an entry with a matrix field in cards or element index mode, double-click on the nested entry to open a slideout, then click the external icon to open the nested entry in a new tab. Notice that the “Revert content from this revision” button shows.

Solution:
Hide the “Revert content from this revision” when viewing an element that doesn’t support revisions (on its own).

Before:
Screenshot 2024-10-21 at 14 33 15

After:
Screenshot 2024-10-21 at 14 33 29

Issue 3:
Create an entry (that has revisions turned on) with a matrix field in cards or element index mode, and add a few nested entries to the matrix field, save. Remove one of the nested entries and save. View the revision that should still have the deleted nested entry - it still shows, but if you try to open it by double-clicking, you’ll get an invalid owner ID error.

Solution:
When getting the element in the ElementsController, if we have a revisionId, ensure we include trashed elements too.

Related issues

n/a

@brandonkelly brandonkelly merged commit 559e1a8 into 5.x Oct 21, 2024
@brandonkelly brandonkelly deleted the bugfix/nested-elements-and-revisions branch October 21, 2024 18:15
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