#12907 closed defect (fixed)
[regression]dojo.parser needs explicit dojo.require in 1.7
Reported by: | Douglas Hays | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Parser | Version: | 1.6.1 |
Keywords: | Cc: | bill, Chris Mitchell | |
Blocked By: | Blocking: |
Description
In dojo 1.6, you could specify parseOnLoad:true in djConfig and the dojo.parser would automatically be run even if you did not do a dojo.require('dojo.parser') in the web page's HEAD section. Starting with Dojo 1.7, you have to add the dojo.require. Since this will affect backward compatibility, I wanted to make sure this was intentional before we ship 1.7.
Change History (13)
comment:1 Changed 10 years ago by
Priority: | normal → high |
---|---|
Summary: | dojo.parser needs explicit dojo.require in 1.7 → [regression]dojo.parser needs explicit dojo.require in 1.7 |
comment:2 Changed 10 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
This is expected behavior, although the characterization in this ticket is a little off. From the 1.7 release notes (migration section):
- You may need to explicitly require the following modules which were getting implicitly loaded before:
- dojo.parser (many widgets which used to include the parser no longer do)
In other words, dojo.require('dojo.parser') was required since 1.0, but you just got away with it until now.
comment:3 Changed 10 years ago by
Note that this change is unrelated to the AMD work, it's just part of our code refactor to streamline for mobile.
comment:4 Changed 10 years ago by
Resolution: | wontfix |
---|---|
severity: | normal → major |
Status: | closed → reopened |
there is a very large # of customers that will be broken if this is the new behavior. If there is technically a way to keep this working with the same behavior as 1.6, we should through the 1.x stream, and note deprecation in debug log.
comment:5 Changed 10 years ago by
Component: | Core → Parser |
---|---|
Resolution: | → wontfix |
Status: | reopened → closed |
Sorry, but this is the direction we are going for 1.7, to allow lightweight applications (especially mobile). See #12432 for details, and note that any of the changes associated with that ticket will cause similar problems.
comment:6 Changed 10 years ago by
For the record, adding "dojo/parser" to the define for _Widget.js would prevent almost all backward compat issues and doesn't seem to affect mobile at all.
comment:7 Changed 10 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
why are we not considering the fix doug recommends for 1.x? This will result in many customer defects coming in.
comment:8 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
As explained in #12275, the goal is lightweight templated widgets. It's not strictly for mobile, but it affects any mobile application using widgets from dijit.
And again, this is not a regression, it's operating according to the original spec from 1.0.
Stop reopening this ticket.
comment:9 Changed 10 years ago by
Note: original documentation is at http://docs.dojocampus.org/dojo/parser?action=recall&rev=2
comment:10 Changed 10 years ago by
How about appending this to the end of _Widget.js (or any other JS file) in order to throw a deprecated warning:
if(dojo.config.parseOnLoad && !dojo.isAsync && !dojo.parser){ dojo.ready(99, function(){ if(!dojo.parser){ dojo.deprecated("Add explicit dojo.require('dojo.parser');", "", "2.0"); dojo.require("dojo.parser"); } }); }
comment:11 Changed 10 years ago by
Adding that code to _TemplatedMixin would fix the "regression" in dijit. Adding it to _WidgetBase would fix the "regression" in dojox.charting (since the charting widgets were changed to not use templates, thus no longer pulling in the parser), albeit breaking dojox.mobile apps which already load an alternate parser.
But, if users expect the parseOnLoad flag to automatically load the parser, it should really happen regardless of whether anything in dijit is loaded or not. (Remember that parser is part of dojo core, not part of dijit.) So, last time I talked to Rawld he thought that made sense, to put the code to load the parser into the kernel.
comment:12 Changed 10 years ago by
Resolution: | invalid → fixed |
---|
marking mustfix 1.7