This is the same bug that exists in Drupal Core: #3102249: Changing an existing embedded media's alignment or alt data attributes does not get saved with CKEditor5.

Steps to reproduce:

  1. Fresh install with Standard install profile, enable the entity_embed module
  2. Enable the embedded entity filter for a text format and add the Node embed button to the CKEditor configuration.
  3. Use layout builder to create a new custom "Basic block" with an embedded content, without making any changes to the embed.
  4. Edit the newly created inline block, edit the embedded content and change one of the embed attributes, but do not change anything else. Save the block.

Expected Results

That the textarea field submits with the changed attribute.

Actual Results

That the textarea field submits with unchanged data attribute.

Note the data-editor-value-is-changed attribute on the textarea is still false in this case, and the contents of the textarea have not been updated.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Dave Reid created an issue. See original summary.

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new521 bytes
dave reid’s picture

Status: Needs review » Needs work

The last submitted patch, 2: 3108085-fix-embed-ckeditor-snapshot.patch, failed testing. View results

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new1.25 KB

This should fix the test failure. Just needed to bump the number of snapshots asserted since we are adding a new one.

emek’s picture

The patch in #5 solves the issue for me.

mcortes19’s picture

Confirm the patch in #5 solves this issue for me.

  • Dave Reid committed 9665555 on 8.x-1.x
    Issue #3108085 by Dave Reid: Fixed changing an existing embedded entity'...
dave reid’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Committed #2 to 8.x-1.x. Leaving open for tests to confirm the CKEditor content.

phuang07’s picture

Confirm #5 is working.

jesss’s picture

#5 is working for me as well.

mei2020 made their first commit to this issue’s fork.