Ticket #2922 (closed Bug: fixed)
Whole editor broken caused by one malformed plugin
| Reported by: | garry.yao | Owned by: | garry.yao |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 3.0 |
| Component: | General | Version: | SVN (FCKeditor) - Retired |
| Keywords: | Confirmed Review+ | Cc: |
Description
Now plugin manager is going down if any of the plugins on the list has a syntax/runtime error or a plugin is not found at the specified position. It's easy to reproduce. The editor should has some level of fault tolerant with plugins, especially when plugin come from external point.
Attachments
Change History
comment:2 Changed 4 years ago by garry.yao
- Owner set to garry.yao
- Status changed from new to assigned
comment:3 Changed 4 years ago by garry.yao
- Keywords Review? added
The patch now deals with the following cases, prevent it from stopping on loading other plugins :
- Malformed plugin files which has syntax error;
- Missing plugin files;
- Missing plugin definition;
comment:4 Changed 4 years ago by fredck
- Keywords Review- added; Review? removed
We can't understand whether a plugin is important or not. Actually, there may be plugins that are decisive for the editor quality, or developers' expectations. So, we can't risk having a working editor which has some of the desired plugins missing.
The solution here should be much simpler than that, simply throwing an error, stopping the editor execution in case of a plugin loading issue. In this way, a developer can catch the error and fix the problem.
comment:5 Changed 4 years ago by garry.yao
- Keywords Review? added; Review- removed
Simplify the solution after confirmed with Fred, the patch is only indented to resolve the issue of this comment.
comment:6 Changed 4 years ago by fredck
- Keywords Review- added; Review? removed
Ok... now I've completely understood the problem, and I confirm this ticket is not valid (comment:4), except for the dialog issue.
I've introduced a syntax error in a dialog file. It's definitely annoying as the button that opens the dialog simply does nothing, instead of at least throwing an error. I've applied the patch, but there is no difference at all. Can you list the steps you are doing to reproduce it?
comment:7 Changed 4 years ago by garry.yao
- Keywords Review? added; Review- removed
Reproducing Procedures
- Introduced a syntax error within _source\plugins\smiley\dialogs\smiley.js file;
- Open the replace by class example page;
- Click on 'Smiley' button to open dialog;
- Expected Result: An JavaScript Error thrown which prompt with name of the troublesome resource.
- Actual Result: The browser hangs for a while for Firefox; Stack overflow error raised for IE.

Sometimes it crash the browser or hangs for a while. It can be very annoying for end-developers. Especially syntax error in external dialog file.