This issue duplicates another issue.
  1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    16
    Vote Rating
    0
    larini is on a distinguished road

      0  

    Default Extjs 4.2 bug?

    Extjs 4.2 bug?


    After installing new Extjs 4.2, I found that the "save" method of a model stops to work.

    I found a minor difference between "buildUrl" in this version:

    4.1:
    if (me.appendId && id)

    4.2:
    if (me.appendId && (id != null)) {

    This is in the "Ext.data.proxy.Rest" definition object.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,991
    Vote Rating
    649
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    This is intended. Some people are sending 0 as an id, so now it explicitly checks if it's null or undefined, otherwise it will send it.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    16
    Vote Rating
    0
    larini is on a distinguished road

      0  

    Default


    Quote Originally Posted by evant View Post
    This is intended. Some people are sending 0 as an id, so now it explicitly checks if it's null or undefined, otherwise it will send it.
    In my case, the id property is an empty string: ""

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,991
    Vote Rating
    649
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    It should probably check for

    Code:
    if (id || id === 0)
    We'll look into it further.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 1

Tags for this Thread