Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-7766 in a recent build.
  1. #1
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    8
    Vote Rating
    0
    jgroth is on a distinguished road

      0  

    Default Timeout is ignored if form is submitted with DirectSubmit

    Timeout is ignored if form is submitted with DirectSubmit


    REQUIRED INFORMATION Ext version tested:
    • Ext 4.1.3
    Browser versions tested against:
    • FF
    DOCTYPE tested against:
    • html
    Description:
    • If a form is submitted with DirectSubmit and a timeout is set for the form, the timeout is ignored and defaults to 30 seconds.

      I have tested the following code and inspected the requests with firebug, and after 30 seconds the request is aborted (and another one is sent). If submit method is changed to the URL in the config, "submitted" is returned after the server script is finished.
    Steps to reproduce the problem:
    • see code below
    The result that was expected:
    • submitted
    The result that occurs instead:
    • timeout
    Test Case:
    Code:
    Ext.require([
        '*'
    ]);
    
    Ext.onReady(function() {
        Ext.app.REMOTING_API = {
            "url" : "save-form.php",
            "type" : "remoting",
            "actions" : {
                "MyForm" : [ {
                    "name" : "onSubmit",
                    "len" : 1,
                    "formHandler" : true
                } ]
            }
        };
        Ext.Direct.addProvider(Ext.app.REMOTING_API);    
    
        var bd = Ext.getBody();
    
        var simple = Ext.widget({
            xtype: 'form',
            layout: 'form',
            api: {
                submit: MyForm.onSubmit
            },
            //url: 'save-form.php',
            timeout: 1000000,
            frame: true,
            bodyPadding: '5 5 0',
            width: 350,
            fieldDefaults: {
                msgTarget: 'side',
                labelWidth: 75
            },
            defaultType: 'textfield',
            items: [{
                fieldLabel: 'Name',
                name: 'first'
            }],
    
            buttons: [{
                text: 'Save',
                handler: function() {
                    this.up('form').getForm().submit();
                }
            }]
        });
    
        simple.render(document.body);
    });

    PHP Code:
    <?php

    set_time_limit
    (600);
    sleep(50);

    echo 
    "submitted";

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,541
    Vote Rating
    872
    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