Page 1 of 4 123 ... LastLast
Results 1 to 10 of 39

Thread: [FIXED][3.0] Ext.urlEncode bug

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061
    Vote Rating
    19
      0  

    Default [FIXED][3.0] Ext.urlEncode bug

    My code does this:

    Code:
            grid.store.load({ params: { start: 0, limit: 25 }});
    On the server, $_REQUEST['start'] is ''

    So I step through ext-all-debug.js and at line 5851:
    Code:
     5851 p = Ext.urlEncode(me.extraParams, typeof p == 'object' ? Ext.urlEncode(p) : p);
    Examine p after and it's this:
    start=&limit=25&xaction=load

    start= should be start=0

  2. #2
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061
    Vote Rating
    19
      0  

    Default

    I don't have the source to Ext.urlEncode in the rc1.zip file

  3. #3
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061
    Vote Rating
    19
      0  

    Default

    Downloaded the source.

    The bug is here:

    Ext.js, lines 294-298:

    Code:
               for(key in o) {
                    Ext.each(o[key] || key, function(val, i) {
                        buf.push("&", e(key), "=", val != key ? e(val) : "");
                    });
                }

  4. #4
    Ext JS Premium Member christocracy's Avatar
    Join Date
    Oct 2006
    Location
    Montreal
    Posts
    381
    Vote Rating
    0
      0  

    Default

    Do you get same behaviour if start > 0?
    /**
    * @author Chris Scott
    * @business www.transistorsoft.com
    * @rate $150USD / hr; training $500USD / day / developer (5 dev min)
    *
    * @SenchaDevs http://senchadevs.com/developers/transistor-software
    * @twitter http://twitter.com/#!/christocracy
    * @github https://github.com/christocracy
    */

  5. #5
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,191
    Vote Rating
    1000
      0  

    Default

    The code in 3.x looks very different to the code in 2.x. We'll look into this.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  6. #6
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061
    Vote Rating
    19
      0  

    Default

    No.

    start: 1

    works

  7. #7
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061
    Vote Rating
    19
      0  

    Default

    Quote Originally Posted by evant View Post
    The code in 3.x looks very different to the code in 2.x. We'll look into this.
    Not really sure what you're trying to do there with comparing the key and value...

  8. #8
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061
    Vote Rating
    19
      0  

    Default

    start: '0' works

  9. #9
    Ext User
    Join Date
    Dec 2007
    Posts
    21
    Vote Rating
    0
      0  

    Default

    I'm seeing this issue as well in any widget that use a PagingToolbar. I also tracked it down to Ext.urlEncode().

    >>> Ext.urlEncode({'foo':0})
    "foo="

  10. #10
    Ext User
    Join Date
    Mar 2009
    Location
    The Netherlands
    Posts
    4
    Vote Rating
    0
      0  

    Default

    I encountered this nasty bug as well.. it seems like all GET parameters with integer value 0 have their value stripped.

    To reproduce:

    Ext.Ajax.request({ url: '/blank', params: { foo: 0 }, method: 'GET' })

    The value of foo will be stripped in the resulting URL.

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •