#4251: Adding wrong plugin doesn't give proper warning -----------------------+---------------------------------------------------- Reporter: alfonsoml | Owner: Type: Bug | Status: new Priority: Normal | Milestone: Component: General | Version: SVN (CKEditor) Keywords: | -----------------------+---------------------------------------------------- Modify a sample so it tries to load a non-existing plugin: {{{ var editor = CKEDITOR.replace( 'editor1', { extraPlugins : 'World' }); }}}
Now loading the page in IE gives an error message without any clue about the problem.[[BR]] It can be improved this way: {{{ #!patch Index: _source/core/plugins.js =================================================================== --- _source/core/plugins.js (revision 4127) +++ _source/core/plugins.js (working copy) @@ -56,6 +56,11 @@ for ( pluginName in allPlugins ) { plugin = allPlugins[ pluginName ]; + if ( !plugin ) + { + alert( 'Plugin "' + pluginName + '" not loaded.' ) ; + continue ; + } if ( plugin.onLoad && !plugin.onLoad._called ) { plugin.onLoad(); }}} For other browsers, it throws an exception in core\scriptmanager.js: {{{ if ( failed.length ) { throw '[CKEDITOR.resourceManager.load] Resource name "' + urlsNames[ failed[ 0 ] ].join( ',' ) + '" was not found at "' + failed[ 0 ] + '".'; } }}} But that's shown only in the error console, it will be more useful if the message is shown in an alert. -- Ticket URL: <http://dev.fckeditor.net/ticket/4251> FCKeditor <http://www.fckeditor.net/> The text editor for Internet ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ FCKeditor-Trac mailing list FCKeditor-Trac@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fckeditor-trac