Opened 16 years ago
Last modified 13 years ago
#4251 confirmed Bug
Adding wrong plugin doesn't give proper warning
Reported by: | Alfonso Martínez de Lizarrondo | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description
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.
It can be improved this way:
-
_source/core/plugins.js
56 56 for ( pluginName in allPlugins ) 57 57 { 58 58 plugin = allPlugins[ pluginName ]; 59 if ( !plugin ) 60 { 61 alert( 'Plugin "' + pluginName + '" not loaded.' ) ; 62 continue ; 63 } 59 64 if ( plugin.onLoad && !plugin.onLoad._called ) 60 65 { 61 66 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.
Change History (1)
comment:1 Changed 13 years ago by
Status: | new → confirmed |
---|---|
Version: | SVN (CKEditor) - OLD → 3.0 |
Agreed that message in IE ("can't get property onLoad. Object is either empty or undefined" ) is not telling anything to the developer but I'm not sure if alerts should replace console.logs.
These messages are only useful for developers and when someone is developing in CKEditor he should be familiar with console. Such extra alert when popping out to regular user might perhaps be considered more annoying (user has to make extra click and when he is checking site every 5 min than he could get really pissed).
On the other hand when such alert pops out user can make a screenshot and send it to his support team – it is better than pressing F12 and going to console to get the message.