Opened 10 years ago

Closed 10 years ago

#8683 closed defect (invalid)

dojo.preventCache incorectly adding url parameter start character

Reported by: alanSthomas Owned by: anonymous
Priority: high Milestone: tbd
Component: General Version: 1.2.3
Keywords: dojo.preventCache refreshOnShow Cc:
Blocked By: Blocking:

Description

When setting refreshOnShow:true for a new content pane dojo will add a url parameter called dojo.preventCache to the end of the url. If the url already has a url parameter, this causes issues.

function openNewForm(formTitle,formURL){

if(testSession()){

var newTab = new dijit.layout.ContentPane({
href:formURL,
title:formTitle,
refreshOnShow:true,
closable: true},
dojo.doc.createElement('div'));
tabs.addChild(newTab);
newTab.startup();
tabs.selectChild(newTab);
}
}

when called the url looks like:

http://example.com/familyMember.php?familyMemberId=92?dojo.preventCache=1234989745064

it should look like:

http://example.com/familyMember.php?familyMemberId=92&dojo.preventCache=1234989745064

I have tested this in 1.2.2 and 1.2.3 with same result. I have also tried it in FF and IE. IE fails to even send a request. FF sends what is stated above.

Attachments (1)

preventCache.html (629 bytes) - added by dante 10 years ago.

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by dante

Attachment: preventCache.html added

comment:1 Changed 10 years ago by dante

Resolution: invalid
Status: newclosed

for the attached test (trunk, 1.3b) i get:

http://localhost/~dante/dojobox/foo.html?bar=10&baz=20a&dojo.preventCache=1234995368103

and

http://localhost/~dante/dojobox/foo.html?bar=10&dojo.preventCache=1234995368098

The code in dojo/_base/xhr.js accommodates this specifically:

ioArgs.url += (ioArgs.url.indexOf("?") == -1 ? "?" : "&") + ioArgs.query;

Please reopen with a test case displaying how in your case the "?" in your href/url is being missed.

Note: See TracTickets for help on using tickets.