Ticket #2922 (closed Bug: fixed)

Opened 6 years ago

Last modified 5 years ago

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

2922.patch (4.7 KB) - added by garry.yao 5 years ago.
2922_2.patch (951 bytes) - added by garry.yao 5 years ago.
2922_3.patch (990 bytes) - added by garry.yao 5 years ago.

Change History

comment:1 Changed 6 years ago by arczi

  • Keywords Confirmed added

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.

comment:2 Changed 5 years ago by garry.yao

  • Status changed from new to assigned
  • Owner set to garry.yao

Changed 5 years ago by garry.yao

comment:3 Changed 5 years ago by garry.yao

  • Keywords Review? added

The patch now deals with the following cases, prevent it from stopping on loading other plugins :

  1. Malformed plugin files which has syntax error;
  2. Missing plugin files;
  3. Missing plugin definition;

comment:4 Changed 5 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 5 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.

Changed 5 years ago by garry.yao

Changed 5 years ago by garry.yao

comment:6 Changed 5 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 5 years ago by garry.yao

  • Keywords Review? added; Review- removed

Reproducing Procedures

  1. Introduced a syntax error within _source\plugins\smiley\dialogs\smiley.js file;
  2. Open the replace by class example page;
  3. 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.

comment:8 Changed 5 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:9 Changed 5 years ago by garry.yao

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed with [3316]. Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy