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

nested element card ownership data #339

Open
wants to merge 2 commits into
base: 4.x
Choose a base branch
from

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
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.

1 participant