Bugfix/nested elements and revisions#15930
Merged
brandonkelly merged 6 commits into5.xfrom Oct 21, 2024
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:

After:

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:

After:

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 arevisionId, ensure we include trashed elements too.Related issues
n/a