Affects Version/s: 6.1.20 EE GA2, 7.0.0 M3
Component/s: ~ [Archived] Frontend Infrastructure
When "Web Content Display" portlet is loading at edition mode, CKEditor takes more time to load than rest of the page. During this loading time its content is blank, so a "save" request of portlet during this time, causes original content to be overwritten with temporal blank content.
There are two use cases for customers:
- When users edit a existing content, they can change a value in a field of the structure (title or other custom field) and save it without waiting CKEditor to be fully initialized.
- When users press "Save as Draft" in a normal situation, they can press the button twice. If the second time is executed after window refresh but before CKEditor initialization, the content is lost.
The problem is easily reproduced in the following situations:
- Using Internet Explorer 8 and Windows XP with an old computer. Because of IE8 JS engine, loading time is increased a lot and there are more chances that users press the save button while CKEditor is not fully loaded.
- With any browser, when the structure is complex and/or has multiple CKEditors, loading time is also increased.
After an analysis of the problem, I have compiled the following information:
- The root cause is that the form is submitted without first checking if the components of the structure have finished loading.
- Button executes _15_saveArticle() JS function where some checks are done, but there is no checks about loading event. At first time I tried to add some checks at this point.
So in my opinion, there are two possible solutions to this issue:
Validation cannot be done at Server side because we cannot distinguish if the blank CKEditor field content is caused by this issue or if the customer wants to save a blank content.