craftcms / ckeditor

Edit rich text content in Craft CMS using CKEditor.
https://plugins.craftcms.com/ckeditor
GNU General Public License v3.0
46 stars 23 forks source link

Nested entry card shows "Invalid entry ID" after undo #224

Closed mmikkel closed 1 month ago

mmikkel commented 1 month ago

Description

If a nested entry is removed in a CKEditor field, and then re-added via undo, the re-inserted nested entry card displays "Invalid entry ID". This only happens if the provisional draft has time to auto-save in between the nested entry being removed, and the undo action (i.e. if the author undoes really fast, before the auto-save has time to kick in, the nested card comes back as normal).

Refreshing the edit page in the browser displays the nested entry card restored to its former glory.

https://github.com/craftcms/ckeditor/assets/298510/efa81d1a-6d1e-4a34-87d9-ec7f0c47df3b

Steps to reproduce

  1. Add a nested entry to a CKEditor field
  2. Remove the nested entry. Allow the provisional draft to auto-save after removing it.
  3. Undo the removal, either by using the undo shortcut (Cmd+Z on Mac) or via the CKEditor "Undo" toolbar action
  4. Observe that the nested entry card now says "Invalid entry ID (something)".
  5. Refresh the edit page; observe that the nested entry card is now restored.

Additional info

brandonkelly commented 1 month ago

Fixed in CKEditor 4.0.5!