You found a bug! We've classified it as EXTJS-8230 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    27
    Vote Rating
    0
    Diavololt is on a distinguished road

      0  

    Default 4.2.0 B1 Form submit invalid format POST fields

    4.2.0 B1 Form submit invalid format POST fields


    I fixed this function:

    toQueryString: function(object, recursive) {
    var paramObjects = [],
    params = [],
    i, j, ln, paramObject, value;


    for (i in object) {
    if (object.hasOwnProperty(i)) {
    paramObjects = paramObjects.concat(ExtObject.toQueryObjects(i, object[i], recursive));
    }
    }


    for (j = 0, ln = paramObjects.length; j < ln; j++) {
    paramObject = paramObjects[j];
    value = paramObject.value;


    if (Ext.isEmpty(value)) {
    value = '';
    }
    else if (Ext.isDate(value)) {
    value = Ext.Date.toString(value);
    }


    params.push(encodeURIComponent(paramObject.name) +
    (value !== '' ? ('=' + encodeURIComponent(String(value))) : '=')); //<------- PHP server apache do not handle this
    }
    return params.join('&');
    },


    For example:
    PHP and Apache does'nt see empty posts:

    wrong POST parameters:
    http://myurl.url/submit.php?notempty...nemptyvalue=bb

    The problem is emptyvalue, who doesnt have '='

    The correct URL is:

    http://myurl.url/submit.php?notemptyvalue=aa&emptyvalue=&secondnonemptyvalue=bb

    on apache with php print_r($_POST)
    In $_POSTA array keys without "=" sign not exists at all

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

Thread Participants: 1