Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#10391 closed defect (fixed)

[regression]dijit._Templated._sanitizeTemplateString is not a function in dojox dtl

Reported by: Dipl.Ing. (FH) Christian K. Fraunholz Owned by: Neil Roberts
Priority: high Milestone: 1.4.1
Component: DojoX DTL Version: 1.4.0b
Keywords: templateString, _sanitizeTemplateString Cc: James Burke
Blocked By: Blocking:

Description

Hi,

after updating to dojo version 1.4 I get the following error message in Firebug: dijit._Templated._sanitizeTemplateString is not a function The error message refers to line 74 in dojox/dtl/_Templated.js:

templateString = dojo.string.trim(templateString || dijit._Templated._sanitizeTemplateString(dojo._getText(templatePath)));

I think someone forgot to change this line to

templateString = dojo.string.trim(templateString || dojo.cache(templatePath, {sanitize: true}));

Change History (11)

comment:1 Changed 10 years ago by Adam Peller

Component: GeneralDojoX DTL
Milestone: tbd1.4
Owner: changed from anonymous to Neil Roberts
severity: normalcritical
Summary: dijit._Templated._sanitizeTemplateString is not a function in dojox dtl[regression]dijit._Templated._sanitizeTemplateString is not a function in dojox dtl

comment:2 Changed 10 years ago by dante

Milestone: 1.41.5

comment:3 Changed 10 years ago by Mark Wubben

Can we fix this for 1.4.1? It's not even a one line change.

comment:4 Changed 10 years ago by Adam Peller

Cc: James Burke added
Milestone: 1.51.4.1

Placing back in 1.4.1 for consideration. The owner has not responded. Mark, I gather you've tested this change and are comfortable with it. Is there something in the test suite that will verify this?

comment:5 Changed 10 years ago by Mark Wubben

I didn't test it, but did run into the error myself and came up with nearly the same solution independently:

templateString = dojo.string.trim(templateString || dojo.cache._sanitize(dojo._getText(templatePath)));

Not sure if this is covered in the test suite, but the comment for dojo.cache._sanitize says it's the same as dijit._Templated._sanitizeTemplateString:

Copied from dijit._Templated._sanitizeTemplateString.

(r21152 line 105)

In any case it looks like DTL was forgotten in the move to dojo.cache.

comment:6 Changed 10 years ago by Adam Peller

Yeah, there are many patches rotting in dojox.dtl which should have been applied in 1.4.0, including your ticket #10014

We need the module owner to take them on, but if that does not happen, at a minimum someone else who is comfortable with dtl has to vouch for them after testing.

comment:7 Changed 10 years ago by Mark Wubben

I'm using DTL quite heavily, though just the _Templated parts, not _DomTemplated. Won't pretend to fully understand it but I'm quite comfortable with it, and I have reported a few of the outstanding tickets. I'm running my own patches without any issues.

Wolfram Kriesing is using DTL extensively as well I believe.

comment:8 Changed 10 years ago by Neil Roberts

Resolution: fixed
Status: newclosed

(In [21156]) Fixes #10391. Update template caching to match dijit._Templated !strict

comment:9 Changed 10 years ago by Adam Peller

(In [21157]) Commit template caching update to 1.4 branch, Fixes #10391 !strict

comment:10 Changed 10 years ago by Adam Peller

(In [21159]) Undo [21157], accidentally committed to 1.3 instead of 1.4. Refs #10391 !strict

comment:11 Changed 10 years ago by Adam Peller

(In [21161]) Commit template caching update to 1.4 branch, Fixes #10391 !strict

Note: See TracTickets for help on using tickets.