[MGNLDAM-759] CKEditor not working due to missing MagnoliaFileBrowser plugin Created: 24/Jul/18  Updated: 15/Apr/19  Resolved: 26/Jul/18

Status: Closed
Project: Magnolia DAM Module
Component/s: None
Affects Version/s: 2.4
Fix Version/s: 2.4.1

Type: Bug Priority: Critical
Reporter: Jonathan Ayala Assignee: Sang Ngo Huu
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: 0d
Time Spent: 1.75d
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2018-07-24 at 13.28.18.png     PNG File Screen Shot 2018-07-26 at 5.03.22 PM.png     PNG File Screen Shot 2018-07-26 at 5.03.32 PM.png     PNG File Screen Shot 2018-07-26 at 5.03.43 PM.png     PNG File Screen Shot 2018-07-26 at 5.03.48 PM.png     PNG File Screen Shot 2018-07-26 at 5.03.54 PM.png     PNG File magnolia566.png     PNG File magnolia57.png    
Issue Links:
Relates
relates to MGNLUI-4525 Wrong logic for customized fieldTypes... Closed
causality
relation
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:
Epic Link: Support
Sprint: Saigon 150
Story Points: 3

 Description   

When using config-magnolia.js file for CKEditor it is not loaded properly due to magnoliaFileBrowser plugin not found. It seems that it is not included since magnolia 5.7.

Steps to reproduce it in demoauthor:

  1. Configure a richtextfield within a form using configJsFile = /.resources/ckeditor/config-magnolia.js
  2. Open the corresponding dialog to verify that it is not loaded correctly.
PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFORMATION: Requested resource [/VAADIN/widgetsets/info.magnolia.widgetset.MagnoliaProWidgetSet/ckeditor/plugins/magnoliaFileBrowser/plugin.js] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.

Debugging it, you can see that there is no js/fileBrowser/plugin.js file

Repeat the steps in Magnolia 5.6.X and check that it is loaded correctly.



 Comments   
Comment by Pierre Sandrin [ 24/Jul/18 ]

Hi, just stumbled on this bug...

I fixed it by removing "magnoliaFileBrowser" on our customized CKEditor configuration files. The possibility to link to DAM documents is still given.

The new line is then:

config.extraPlugins = "magnolialink";

 

Comment by Mikaël Geljić [ 24/Jul/18 ]

Also affects the editor when *not* working with a config.js file, but in slightly different ways:

  1. Set images config to true on the RichTextFieldDefinition
  2. Editor opens, has the image button in toolbar
  3. When pressing it, the CKEditor image properties dialog shows up, but the Browse button next to the URL field is missing.

There as well, the dev-tools show no sign of the filebrowser plugin.js being even requested.

Comment by Sang Ngo Huu [ 25/Jul/18 ]

Root cause:
Field type configuration is moved from JCR to YAML, so the task update rich text field to use new AssetsEnabledRichTextFieldFactory does not affect

Solution:
decorate richtext field to use AssetsEnabledRichTextFieldFactory by YAML

Comment by Dai Ha [ 26/Jul/18 ]

QA using magnolia-community-demo-bundle-5.7.1-20180726.093120-59-tomcat-bundle.zip. Attaching several screenshots from QA process

Comment by Viet Nguyen [ 06/Nov/18 ]

Work around for 5.7:

Open our Resources app and create below folder and file structure:
/dam-app/decorations/ui-framework/fieldTypes/richText.yaml

Reference:
https://demo.magnolia-cms.com/.magnolia/admincentral#app:resources:browser;/dam-app/decorations/ui-framework/fieldTypes/richText.yaml:treeview:

put this line into the file:

factoryClass: info.magnolia.dam.app.ui.field.factory.AssetsEnabledRichTextFieldFactory
Generated at Mon Feb 12 05:02:59 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.