#15160 closed defect (fixed)
invalid plugin name interferes with loading other plugins
Reported by: | Jovanovic | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | low | Milestone: | 1.8 |
Component: | Editor | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Hello,
I discovered a little bug with dijit/_editor/plugins/ViewSource plugin : if i declare a plugin that it isn't required, when i click on viewsource button, source code of the editor isn't rendered.
<!DOCTYPE html> <html > <head> <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/dojo.js" data-dojo-config="parseOnLoad: true, async: true, isDebug: true"></script> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dijit/themes/claro/claro.css"> <script>require(["dojo/parser","dijit/Editor","dijit/_editor/plugins/ViewSource"]);</script> </head> <body class="claro"> <div data-dojo-type="dijit.Editor" id="editor1" data-dojo-props="plugins:['cut','copy','paste','toto','viewsource','AutoUrlLink']"> <p>This instance is created with a subset of functions enabled in the order we want</p> </div> </body> </html>
Attachments (2)
Change History (6)
Changed 9 years ago by
Attachment: | viewsource.html added |
---|
comment:1 Changed 9 years ago by
Component: | Dijit → Editor |
---|---|
Priority: | undecided → low |
Summary: | bug with dijit.editor viewsource plugin → invalid plugin name interferes with loading other plugins |
Changed 9 years ago by
Attachment: | 15160.patch added |
---|
Patch for this issue. Improved message when plugin fails to load (it reports the name in the error). Also added small check in the ViewSource? plugin to verify that an object passed in is actually an extension of _Plugin.
comment:2 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|---|
Owner: | set to Jared Jurkiewicz |
Status: | new → assigned |
This seems good to me, go ahead and check this in (but the cutoff is today's meeting).
comment:4 Changed 9 years ago by
Ignore the '[IGNORE:RALLY,COPYRIGHT]' That's a message I am required to use every day at my job for commits to SVN, so I 'auto-type' it if I don't force myself not to. It has no relation to the code/copyright of dojo. Sorry about that.
Generally, dijit isn't expected to complete initialization when it hits an error, but I'll take a look anyway. It is printing a "Cannot find plugin toto" error message to the console.