Opened 5 years ago

Closed 4 years ago

#18122 closed defect (fixed)

[regression] JsonRest _getTarget in 1.10.0 breaks targets like "/path/to/target?idProperty="

Reported by: psbucky Owned by: dylan
Priority: blocker Milestone: 1.10.5
Component: Data Version: 1.10.0
Keywords: Cc:
Blocked By: Blocking:

Description

A simple fix might be to change:

if(target.charAt(target.length-1) == '/'){

to

if((target.charAt(target.length-1) == '/') || (target.charAt(target.length-1) == '=')){

A simple workaround to code that was working in 1.9.3 might be to add

_getTarget:function(id){ return this.target+id; }

to the initializer

Change History (8)

comment:1 Changed 5 years ago by psbucky

I guess my description wasn't good.

With a PHP backend, I found that my targets like

/path/to/target?idProperty=

...were generating requests with a '/' prepended to the idProperty. Like if the id is 5, I was getting requests like

/path/to/target?idProperty=/5

...instead of what I was used to with dojo 1.9.3:

/path/to/target?idProperty=5

It would seem that _getTarget in 1.10.0 is the culprit in generating the unwanted slashes. I'm requesting that _getTarget be changed to test for terminal '=' signs as well as terminal '/' characters.

In the meantime, for others who may have migration issues, I'm offering the workaround to simply override getTarget in the object initializer to quickly get JsonRest? working in 1.10.0 like it used to in 1.9.3.

comment:2 Changed 5 years ago by bill

Component: GeneralData
Milestone: tbd1.10.1
Owner: set to Kris Zyp
Status: newassigned
Summary: JsonRest _getTarget in 1.10.0 breaks targets like "/path/to/target?idProperty="[regression] JsonRest _getTarget in 1.10.0 breaks targets like "/path/to/target?idProperty="

So a regression from 7a0ebb9 or 37233ca?

comment:3 Changed 5 years ago by Colin Snover

Milestone: 1.10.11.10.2

1.10.1 has been released, retargeting all open tickets to next milestone.

comment:4 Changed 5 years ago by Colin Snover

Milestone: 1.10.21.10.3

1.10.2 has been released; moving to next milestone.

comment:5 Changed 5 years ago by tsemachh

+1 for this one , we are failing on this one as well

comment:6 Changed 4 years ago by dylan

Milestone: 1.10.31.11
Priority: undecidedblocker

comment:7 Changed 4 years ago by dylan

Owner: changed from Kris Zyp to dylan

comment:8 Changed 4 years ago by dylan

Milestone: 1.111.10.5
Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.