Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#6377 closed defect (fixed)

dojox.data.XmlStore _getDeleteUrl method borked

Reported by: John Locke Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.1.1
Component: DojoX Data Version: 1.1.0
Keywords: Cc: john@…
Blocked By: Blocking:

Description

In 1.1.0, it's at line 964:

if (!this.url !== "") {

... this snippet always resolves to true, and the next line returns this.url. However, there's some useful code immediately after that, which appends the item keyvalue to the query string before submitting, which can never execute.

Suggest removing this if block entirely.

Attachments (1)

dojox.data.XmlStore_20080410.patch (721 bytes) - added by Jared Jurkiewicz 12 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 12 years ago by John Locke

Suggested patch, to replace this method and fix for appending to existing query string as well as stripping "@" from attributes:

		var url = this.url;
		if (item && this.keyAttribute !== "") {
			var value = this.getValue(item, this.keyAttribute);
			if (value) {
				var key = this.keyAttribute.charAt(0) ==='@' ? this.keyAttribute.substring(1): this.keyAttribute;
				url += url.indexOf('?') < 0 ? '?' : '&';
				url += key + '=' + value;
			}
		}
		return url;	//string

I'll be happy to sign a CLA--where do I start?

comment:2 Changed 12 years ago by Adam Peller

dojotoolkit.org/cla

comment:3 Changed 12 years ago by John Locke

CLA for Freelock LLC submitted via email.

--John Locke

Changed 12 years ago by Jared Jurkiewicz

comment:4 Changed 12 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

Fixed in revision 13298 or later.

comment:5 Changed 12 years ago by Adam Peller

Milestone: 1.1.1
Note: See TracTickets for help on using tickets.