[MGNLUI-4187] Rich Text Editor - Source View : Does Not Save Changes Made (Chrome) Created: 06/Apr/17 Updated: 28/Dec/17 Resolved: 25/Oct/17 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | page editor |
| Affects Version/s: | 5.5.3, 5.6 |
| Fix Version/s: | 5.5.8, 5.6 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Julian Nodarse | Assignee: | Federico Grilli |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 1d 1h | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Chrome |
||
| Attachments: |
|
||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||||||
| Sprint: | Basel 118, Basel 119 | ||||||||||||||||||||||||||||
| Story Points: | 2 | ||||||||||||||||||||||||||||
| Description |
|
The rich text editor does not persist edits made within “source view”. It will only persist if you switch back to the normal view. Changes made within source view will be erased if you click the save button without switching to normal view. It is expected that the edits persist after clicking the save button without having to switch to the normal view again Steps to reproduce : You will notice no changes are made and if you click edit again, the changes have been removed from the rich text editor dialog. Note: This issue is only seen in 5.5.3 and not in 5.4.11 |
| Comments |
| Comment by Julian Nodarse [ 06/Sep/17 ] |
|
Closing this ticket seeing that it is an issue with CKEditor itself. You can reproduce the issue by testing on their demo here: https://ckeditor.com/features |
| Comment by Antti Hietala [ 08/Sep/17 ] |
|
Reopened after discussion with mgeljic. Magnolia should handle the situation better. Losing content is an issue. Investigate if there's a way to check on save whether the CKEditor source view is still open and changes are pending. Commit the changes before closing the dialog. A CKEditor workaround is proposed in SUPPORT-7447. |
| Comment by Michael Büchele [ 11/Sep/17 ] |
|
Here is a working example with the CKEditor: I can insert text in the source code: And then click "submit" to post the data to the server: This works as expected! |
| Comment by Sebastian Tauch [ 11/Sep/17 ] |
|
@ahietala
Is it possible to share the workaround here? |
| Comment by Antti Hietala [ 11/Sep/17 ] |
|
stauch, proposed workaround from SUPPORT-7447: CKEditor provides two plugins for source code editing:
Try the second plugin! It solved the issue for me. My changes in the source view were saved successfully. Download Instructions: 1. Download the plugin and extract the zip to a resource folder. I extracted mine to /magnoliaAuthor/modules/ckeditor/plugins/sourcedialog where I keep my light modules. 2. Configure the plugin in config-magnolia.js. I copied the default config-magnolia.js file to /magnoliaAuthor/modules/ckeditor/config-magnolia.js and made the following changes: Register the new plugin: CKEDITOR.plugins.addExternal( 'sourcedialog', '/magnoliaAuthor/.resources/ckeditor/plugins/sourcedialog/', 'plugin.js' ); Swap the plugins: config.extraPlugins = 'sourcedialog'; config.removePlugins = 'sourcearea'; Change the button name in the toolbar config, see Source Code Editing in CKEditor documentation:
\{ name: "tools", items: \[ "Sourcedialog" \] \}
4. Reload the rich text field in the browser. You may also want to set magnolia.develop=true to make sure resources are not cached. Attached my custom config-magnolia.js |
| Comment by Sebastian Tauch [ 12/Sep/17 ] |
|
Thank you very much, the workaround solved our issue! |
| Comment by Federico Grilli [ 20/Oct/17 ] |
|
Apparently the issue is with CKEditor itself and only on Chrome https://dev.ckeditor.com/ticket/16935 (I could not reproduce it on FF and Safari for instance). |