Opened 13 years ago
Closed 13 years ago
#3958 closed defect (fixed)
Editor dies due to removed require statement
Reported by: | guest | Owned by: | liucougar |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | Editor | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
In the latest version of Editor, the dojo.require for dijit._editor.plugins.DefaultToolbar? was removed, leading to the widget not initializing the toolbar and dying during postCreate. This can be rectified by adding the dojo.require back in, since the DefaultToolbar? is hardcoded into the Editor widget as the single default plugin to load.
However, if this bug is fixed by requiring dijit._editor.plugins.DefaultToolbar?, the Editor still fails to load as that file also leaves out a required file. Line 36 is commented out, leaving out the requirement for dijit._editor.plugins.LinkDialog? to be loaded, despite the fact that it is then called on the next line.
Proposed fixes for both issues:
Add to dijit/Editor.js, near line 6:
dojo.require("dijit._editor.plugins.DefaultToolbar");
On line 36 in dijit/_editor/plugins/DefaultToolbar, un-comment the line:
//dojo['require']('dijit._editor.plugins.LinkDialog');
or, near line 4, add:
dojo.require('dijit._editor.plugins.LinkDialog');
Change History (7)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Component: | Dijit → Editor |
---|---|
Milestone: | → 0.9 |
Owner: | changed from bill to liucougar |
comment:3 Changed 13 years ago by
i can confirm this. the test page doesn't have the problem because IT is manually including dijit._editor.plugins.DefaultToolBar? && LinkDialog? . do we want to require people to require seemingly _private 'plugins' for a default, require them in by default, or do some fancy checking and require the defaults in if a custom plugin hasn't been specified?
comment:4 Changed 13 years ago by
DefaultToolbar? will be going away (will file separate bug for that), but in the meantime lets put the require for DefaultToolbar? back in, and make sure that the default toolbar doesn't include the LinkDialog?.
comment:6 Changed 13 years ago by
Priority: | normal → high |
---|
comment:7 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: Ben Schell is covered under the same CLA as I am. He's the one who reported this at my recommendation.