Skip to content

Conversation

@i-just
Copy link
Contributor

@i-just i-just commented Dec 11, 2024

Description

If the owner element was edited and just got a provisional draft (without the page being reloaded), ensure we set the updated data-owner-id on the CKEditor’s nested element cards.

Steps to reproduce:

  • set up a section with an entry type that contains a CKE field; the CKE field allows for nested entries
  • create an owner entry, add content to the CKE, add a nested entry in the CKE; fully save everything
  • edit the owner entry so that a provisional draft is created, but don’t reload the page
  • click “Preview” and edit the entry nested in the CKE; once the autosave finishes its job, try to save that nested entry
  • "The owner element must be a derivative.” error pops up

This was happening because when the entry nested in the CKE was edited, it was swapped for the provisional draft (with the “Edited” label), and that version of the card had both data-owner-id and data-primary-owner-id set to the owner's canonical id.

Related issues

n/a

@i-just i-just marked this pull request as ready for review December 11, 2024 11:17
@i-just i-just requested a review from brandonkelly as a code owner December 11, 2024 11:17
@brandonkelly brandonkelly merged commit 184ef8b into 4.x Jan 23, 2025
2 of 3 checks passed
@brandonkelly brandonkelly deleted the bugfix/nested-element-card-ownership-data branch January 23, 2025 19:13
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.

3 participants