You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #11
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,546
    Vote Rating
    64
    Animal is a jewel in the rough Animal is a jewel in the rough Animal is a jewel in the rough

      0  

    Default


    So this should be moved to the Bugs folder really, as a 2.x/3.x bug?

  2. #12
    Sencha User
    Join Date
    Nov 2007
    Posts
    62
    Vote Rating
    0
    ljadrbln is on a distinguished road

      0  

    Default


    I had same problems for opera 10.
    My temporary solution is:
    Ext.SSL_SECURE_URL = 'about:dummy.html'; instead of default value

  3. #13
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,963
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    After some futher testing, the onload handler was handling the load event for the initial src attrib set when the frame was created. It would be best to set the reset URL AFTER the frame was added to the DOM.

    Thus, the fix:

    Code:
    // private
            doFormUpload : function(o, ps, url){
                var id = Ext.id(),
                    doc = document,
                    frame = doc.createElement('iframe'),
                    form = Ext.getDom(o.form),
                    hiddens = [],
                    hd,
                    encoding = 'multipart/form-data',
                    buf = {
                        target: form.target,
                        method: form.method,
                        encoding: form.encoding,
                        enctype: form.enctype,
                        action: form.action
                    };
    
                Ext.fly(frame).set({
                    id: id,
                    name: id,
                    className: 'x-hidden'
                });
                //Add to DOM first
                doc.body.appendChild(frame);
    
                //Reset the Frame to neutral domain
                  Ext.fly(frame).set({
                   src : Ext.SSL_SECURE_URL 
                  });
    
                // This is required so that IE doesn't pop the response up in a new window.
                if(Ext.isIE){
                   document.frames[id].name = id;
                }
    ..should do it.
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  4. #14
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    97
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    So the src needs to be set after the frame is added to the document? Otherwise there is no difference with the current Ext 3.x implementation.

    However, I just noticed that Ext 2.x only sets the src for IE and not for other browsers!

    ps. You don't need the Ext.isIE && Ext.isSecure check, because Ext.SSL_SECURE_URL is already defined as:
    Code:
    Ext.SSL_SECURE_URL = isSecure && isIE ? 'javascript:""' : 'about:blank';

  5. #15
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,963
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Yep, your right, after testing on Browsers, Ext.SSL_SECURE_URL should be just fine.

    Fix amended.
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  6. #16
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,963
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    This has not made it in to SVN yet...

    Bumping
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  7. #17
    Sencha User
    Join Date
    Jan 2008
    Posts
    12
    Vote Rating
    0
    shprota is on a distinguished road

      0  

    Default


    I would really appreciate this fix being added to the next release. For now I have to do with the modified by hand version which leaves me vulnerable to future updates.
    Without this fix the upload dialogs do not work in Opera.

  8. #18
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,963
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Fixed in SVN Core for 3.x.
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  9. #19
    Sencha User
    Join Date
    Jun 2011
    Posts
    10
    Vote Rating
    0
    Redsandro is on a distinguished road

      0  

    Default Not fixed.

    Not fixed.


    Took me forever to find out, but ergo conclusio: Fix never made it to stable?

    In ExtJS 3.3.1 and 4.0.0, upload confirmation is STILL not working for Opera 10 and Opera 11. Uploads will never end, even though they are successfully finished.

    Safari/Firefox no problem. Is there a workaround?

  10. #20
    Sencha User
    Join Date
    Jul 2009
    Posts
    16
    Vote Rating
    0
    sormy is on a distinguished road

      0  

    Default


    PHP Code:
    // Ext 3.3.1
    // Opera 10.x/11.x upload problem
    // http://www.sencha.com/forum/showthread.php?79640-FIXED-129-2.x-3.x-Opera-10-upload-form/page2
    (function(){
        var 
    BEFOREREQUEST "beforerequest",
            
    REQUESTCOMPLETE "requestcomplete",
            
    REQUESTEXCEPTION "requestexception",
            
    UNDEFINED undefined,
            
    LOAD 'load',
            
    POST 'POST',
            
    GET 'GET',
            
    WINDOW window;
            
        
    Ext.override(Ext.data.Connection, {
            
    // private
            
    doFormUpload : function(opsurl){
                var 
    id Ext.id(),
                    
    doc document,
                    
    frame doc.createElement('iframe'),
                    
    form Ext.getDom(o.form),
                    
    hiddens = [],
                    
    hd,
                    
    encoding 'multipart/form-data',
                    
    buf = {
                        
    targetform.target,
                        
    methodform.method,
                        
    encodingform.encoding,
                        
    enctypeform.enctype,
                        
    actionform.action
                    
    };

                
    /*
                 * Originally this behaviour was modified for Opera 10 to apply the secure URL after
                 * the frame had been added to the document. It seems this has since been corrected in
                 * Opera so the behaviour has been reverted, the URL will be set before being added.
                 */
                
    Ext.fly(frame).set({
                    
    idid,
                    
    nameid,
                    
    cls'x-hidden'//,              // patch
                    //src: Ext.SSL_SECURE_URL       // patch
                
    }); 

                
    doc.body.appendChild(frame);
                
                
    // patch
                
    Ext.fly(frame).set({
                    
    src Ext.isOpera 'about:dummy.html' Ext.SSL_SECURE_URL 
                
    });

                
    // This is required so that IE doesn't pop the response up in a new window.
                
    if(Ext.isIE){
                   
    document.frames[id].name id;
                }


                
    Ext.fly(form).set({
                    
    targetid,
                    
    methodPOST,
                    
    enctypeencoding,
                    
    encodingencoding,
                    
    actionurl || buf.action
                
    });

                
    // add dynamic params
                
    Ext.iterate(Ext.urlDecode(psfalse), function(kv){
                    
    hd doc.createElement('input');
                    
    Ext.fly(hd).set({
                        
    type'hidden',
                        
    valuev,
                        
    namek
                    
    });
                    
    form.appendChild(hd);
                    
    hiddens.push(hd);
                });

                function 
    cb(){
                    var 
    me this,
                        
    // bogus response object
                        
    = {responseText '',
                             
    responseXML null,
                             
    argument o.argument},
                        
    doc,
                        
    firstChild;

                    try{
                        
    doc frame.contentWindow.document || frame.contentDocument || WINDOW.frames[id].document;
                        if(
    doc){
                            if(
    doc.body){
                                if(/
    textarea/i.test((firstChild doc.body.firstChild || {}).tagName)){ // json response wrapped in textarea
                                    
    r.responseText firstChild.value;
                                }else{
                                    
    r.responseText doc.body.innerHTML;
                                }
                            }
                            
    //in IE the document may still have a body even if returns XML.
                            
    r.responseXML doc.XMLDocument || doc;
                        }
                    }
                    catch(
    e) {}

                    
    Ext.EventManager.removeListener(frameLOADcbme);

                    
    me.fireEvent(REQUESTCOMPLETEmero);

                    function 
    runCallback(fnscopeargs){
                        if(
    Ext.isFunction(fn)){
                            
    fn.apply(scopeargs);
                        }
                    }

                    
    runCallback(o.successo.scope, [ro]);
                    
    runCallback(o.callbacko.scope, [otruer]);

                    if(!
    me.debugUploads){
                        
    setTimeout(function(){Ext.removeNode(frame);}, 100);
                    }
                }

                
    Ext.EventManager.on(frameLOADcbthis);
                
    form.submit();

                
    Ext.fly(form).set(buf);
                
    Ext.each(hiddens, function(h) {
                    
    Ext.removeNode(h);
                });
            }
        });
    })();