Ticket #6377 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

dojox.data.XmlStore _getDeleteUrl method borked

Reported by: freelock Owned by: jaredj
Priority: normal Milestone: 1.1.1
Component: DojoX Data Version: 1.1.0
Severity: normal Keywords:
Cc: john@…

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

dojox.data.XmlStore_20080410.patch (0.7 kB) - added by jaredj 9 months ago.

Change History

Changed 9 months ago by freelock

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?

Changed 9 months ago by peller

dojotoolkit.org/cla

Changed 9 months ago by freelock

CLA for Freelock LLC submitted via email.

--John Locke

Changed 9 months ago by jaredj

Changed 9 months ago by jaredj

  • status changed from new to closed
  • resolution set to fixed

Fixed in revision 13298 or later.

Changed 9 months ago by peller

  • milestone set to 1.1.1
Note: See TracTickets for help on using tickets.