Opened 7 years ago
Closed 5 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 7 years ago by
comment:2 Changed 7 years ago by
Component: | General → Data |
---|---|
Milestone: | tbd → 1.10.1 |
Owner: | set to Kris Zyp |
Status: | new → assigned |
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 6 years ago by
Milestone: | 1.10.1 → 1.10.2 |
---|
1.10.1 has been released, retargeting all open tickets to next milestone.
comment:4 Changed 6 years ago by
Milestone: | 1.10.2 → 1.10.3 |
---|
1.10.2 has been released; moving to next milestone.
comment:6 Changed 5 years ago by
Milestone: | 1.10.3 → 1.11 |
---|---|
Priority: | undecided → blocker |
comment:7 Changed 5 years ago by
Owner: | changed from Kris Zyp to dylan |
---|
PR added at https://github.com/dojo/dojo/pull/177
comment:8 Changed 5 years ago by
Milestone: | 1.11 → 1.10.5 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
I guess my description wasn't good.
With a PHP backend, I found that my targets like
...were generating requests with a '/' prepended to the idProperty. Like if the id is 5, I was getting requests like
...instead of what I was used to with dojo 1.9.3:
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.