CKEditor5 Not Saving Data entered in source tab

Created on 12 December 2024, 9 days ago

Problem/Motivation

I am currently using drupal 10.3.10 version and using ckeditor5. When trying to edit content in source tab and come out of it and try to save the data. The data is not saving completely and sometimes not saving at all. Also, data is getting clipped frequently when trying to save.

Steps to reproduce

Step 1: Navigate to any of the content pages,
Step 2: Click on edit and edit content in the ckeditor5.
Step 3: Tried to make some edits to the text.
PS: The text format selected is site studio.

When clicking apply button and clicking on save. Data is either partially saved or sometimes not saved at all.

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

10.3

Component

ckeditor5.module

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @siddhartha0608
  • The steps to reproduce list ordinary actions which are not failing on any system I've been using. So, we will need additional steps to reproduce from you. For example, the "site studio" text format isn't a default in Drupal Core. If you suspect it is involved, its configuration needs to be clarified by you. As written, it's hard to tell if CKEditor is doing this because you said you have to save the data to see it happen. If the data is as expected when leaving the source tab, then this may not involve CKEditor.

    Additionally, it would be helpful to know whether Drupal or the browser console log are indicating errors.

    But what we need most are very clear steps to reproduce performed and verified by you on a newly-installed Drupal site.

  • CKEditor is not causing the issue on a normal page. But I am seeing issue inside Site Studio component.
    However, when used under a layout canvas, it is causing the issue.

    Here are the detailed steps.
    1. Create a content with a predefined Sitestudio layout.
    2. Drag the 'Text' Component from the available Basic Components under components section.
    3. Double click on the newly added component.
    4. A black modal appears on the right hand side with the CKEditor inside it
    5. Type some text in the CKEditor window.
    6. Click on 'Apply' Button.
    7. Try to re-open the 'Text' Component and see that the text just added is not present.

    Moreover, this issue is not happening in Drupal 10.2.6, But I am seeing this in our latest Drupal version 10.3.10

  • Is this Site Studio, as in, the Acquia product?

  • Yes, the CKEditor is inside the Site Studio Component. This application is hosted on Acquia.

  • Have you been in touch with Acquia Support about this?

  • Hi.
    Yes, I have contacted Acquia regarding this issue. They provided me the patch. I applied and its working.
    Here is the patch.
    https://www.drupal.org/project/drupal/issues/3443422 🐛 [regression] Drupal.editors.ckeditor5.onChange event doesn't fire after final input if user types too fast. Active
    https://www.drupal.org/files/issues/2024-06-05/3443422.patch

    Thanks for your quick responses!! I appreciate your help.

Production build 0.71.5 2024