Opened 9 years ago
Closed 9 years ago
#13494 closed Bug (fixed)
Toolbar Configurator Error if some plugin requires one of the plugins which TConf tries to remove
Reported by: | Steve James | Owned by: | Szymon Kupś |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.5.2 |
Component: | UI : Toolbar | Version: | 4.5.1 |
Keywords: | Cc: |
Description
IE11 Full Build with extra plug-ins
Loaded toolbar configurator got browser exception when switching to toolbar advanced mode. (I had the IE debugger loaded.)
I have attached a screen shot and my build-config.js file for reference.
Attachments (2)
Change History (12)
Changed 9 years ago by
Attachment: | Capture.JPG added |
---|
comment:1 Changed 9 years ago by
Some 3rd party plugins may not work out of the box. If it requires some configuration options or works under certain conditions, then these conditions may not be met in the toolbar configurator. Then, problems may occur and there's no solution for that as we don't control those plugins.
Question is - how to notify the user about such problems.
Second thing - if the Start sample works, then toolbar configurator should too unless I miss something.
comment:2 Changed 9 years ago by
Keywords: | Toolbar Configurator removed |
---|---|
Milestone: | → CKEditor 4.5.2 |
Status: | new → confirmed |
Summary: | Toolbar Configurator Error → Toolbar Configurator Error if some plugin requires one of the plugins which TConf tries to remove |
I've just realised that tconf tries to remove some plugins to speed it up. This breaks wordcount. So this is a valid issue.
comment:3 Changed 9 years ago by
@SteveTheTechie the problem is WourCount plugin.
First problem is that it requires htmlwriter plugin which configurator tries to remove. This is confirmed bug.
The problem is that this plugin, even after fixing above problem (or simply removing requirement from plugin's code), will not work anyway and break configurator.
This should be reported to plugin author.
There is a method inside plugin counterElement(editorInstance)
which evaluets to null and causes exception in code counterElement(editorInstance).innerHTML
. Generally plugin is missing some checks whether footer is even available and fail gently (with some console log) if it is not.
comment:4 Changed 9 years ago by
Good work on the troubleshooting!
I do think this does sort of point to the challenges of trying to make the configurator code reliably decipher all of the installed plug-ins and make the Toolbar Configurator work accordingly.
comment:5 Changed 9 years ago by
Owner: | set to Szymon Kupś |
---|---|
Status: | confirmed → assigned |
comment:6 Changed 9 years ago by
It looks like required plugins are loaded properly and error is intentionally placed in timeout to prevent any blocking. It informs that there was a plugin on config.removePlugins
list but it was loaded anyway because it is required by some other plugin (in this case htmlwriter
plugin is required by wordcount
plugin).
Possible solutions:
- Keep whole plugins list without removing anything by toolbar configurator.
- Check if plugins are required by other plugins before removing them by toolbar configurator. Plugin removal is happening on
configLoaded
event, before loading actual plugins. Checking dependencies in not yet loaded plugins might be tricky. - Change the way user is informed about plugins that cannot be removed. Now error is thrown and may suggest that something went wrong.
comment:7 Changed 9 years ago by
Keep whole plugins list without removing anything by toolbar configurator.
Yep. This will be the simplest solution. The list of plugins was trimmed to try to speed up editor initialisation, but we haven't thought about requirements. Let's just deoptimise this. Not a big deal.
comment:8 Changed 9 years ago by
Status: | assigned → review |
---|
Deleted code that was responsible for plugin removal by toolbar configurator.
Pushed branch:t/13494.
Note: there are still errors caused by wordcount
plugin (comment:3) that should be reported to the plugin author.
comment:9 Changed 9 years ago by
Status: | review → review_passed |
---|
comment:10 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Merged git:894c103 into master.
Screen Capture of error state in IE11 debugger