Results 1 to 6 of 6

Thread: [MODERN 6.0.1] Unable to submit a filefield

  1. #1
    Sencha User
    Join Date
    Apr 2016
    Location
    Marseille, France
    Posts
    5

    Default Answered: [MODERN 6.0.1] Unable to submit a filefield

    Hi everyone, I'm currently trying to submit a form including a file field, some text fields, select fields, and a datepicker field.

    I tried many things to make this submission correctly done, but from the moment I try to submit my file field, this error appears :

    "TypeError: response.request is undefined"



    If i try to submit my form without the file field, my request perfectly works.

    Here's my form :

    Code:
    Ext.define('Myapp.view.profil.editForm.InfosPrincipales', {
       extend: 'Myapp.view.profil.editForm.EditBase', //The form Panel
    
       alias: 'widget.infosprincipalesedit',
       xtype: 'infosprincipalesedit',
       reference: 'infosPrincipalesForm',
    
       items: [
          {
    
             xtype: 'filefield',
             label: 'Photo',
             name: 'photo',
    
             accept: 'image',
    },{
    
             xtype: 'textfield',
             label: dico['Surname'],
             name: 'prenom',
             
             twoWayBindable: {
                value: 1
    },
             bind: '{myBind.prenom}',
    },{
    
             xtype: 'textfield',
             label: dico["Name"],
             name: 'nom',
    
             bind: '{myBind.nom}',
    },{xtype: 'selectfield',
             label: dico['Profession'],
             name: 'metier',
    
             reference: 'metiersSelect',
             store: 'storeMetiers',
             usePicker: 'auto',
             valueField: 'id',
    },{
    
             xtype: 'selectfield',
             label: dico['Specialty'],
             name: 'specialitee',
    
             reference: 'specialiteeSelect',
             store: 'storeSpecialites',
             usePicker: 'auto',
             valueField: 'id',
             },{
    
             xtype: 'selectfield',
             label: dico["Nationality"],
             name: 'nationalite',
    
             reference: 'nationalitesSelect',
             store: 'storeNationalites',
             usePicker: 'auto',
             valueField: 'id',
    },{
    
             xtype: 'datepickerfield',
             label: dico["Birthday"],
             name: 'naissance',
    usePicker: 'auto',
             bind: '{Anotherbind_formulas}',
             dateFormat: dico['m/d/Y'],
             picker: {
                    yearFrom: 1900
    }
          },{
             
             xtype: 'selectfield',
             label: dico['Gender'],
             name: 'sexe',
    
             reference: 'sexeSelect',
             store: 'storeGenres',
             displayField: dico['field_store'],
             usePicker: 'auto',
             valueField: 'id',
    },{
    
             docked: 'bottom',
             xtype: 'toolbar',
    
             items: ['->',{
    
                xtype: 'button',
                text: dico['Save'],
                iconCls: 'x-fa fa-angle-right',
                ui: 'confirm',
                handler: 'onSaveInfosClick'
    }]
          }
       ]
    });
    And here's the handler for the submit button :

    Code:
     
    onSaveInfosClick: function() {
    
       var thisView = this.getView();
       thisView.submit({
          url: 'espaces_Profil/mainprofiledit',
          waitMsg: dico["Please wait"],
    
          success: function(thisView, result, data){
    
             Ext.Msg.alert('OK', 'everything's cool');
          },
          failure: function(thisView, result) {
    
             Ext.Msg.alert('Erreur', result.errormsg);
          }
       });
    }
    That makes something like 2 days I'm trying to solve this problem. I already made MANY researches on the sencha documentation, I read something like 15 threads on this forum and looked for information on Saki's website...

    I'm using PHP Zend Framework for the back-end, ExtJS 6.0.1 with Sencha CMD 6.1.2.15 ..

    If you want me to give you more information, don't hesitate to ask.

    PS : - I didn't paste all of the content of my sources for the select/text/datepicker fields because I'm pretty sure that it doesn't have any impact on my bug.

    - The EditBase.js "included" only contains some general configs for all the different forms I'll have to do later on.

    I hope that everything's clear, and if you think that I missed something, check above, "don't hesitate to ask" !

    Thank you in advance.

  2. The bug ticket to which I was referring was EXTJS-19433. Does the issue occur for you if you use a very simple filefield test case outside of your application?

    I'm afraid I don't have any information about whether 6.0.2 will be released GPL.

  3. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    I do see a bug ticket for the filefield which was fixed in 6.0.2. Are you able to test against that version to confirm if it's the same issue?

  4. #3
    Sencha User
    Join Date
    Apr 2016
    Location
    Marseille, France
    Posts
    5

    Default GPL version ?

    Thanks for your answer. But I can't test my app on the v6.0.2. The only bug that's close to mine on the release note is this one :

    "EXTJS-19514 File field without fixed “name” fails on second upload."


    I didn't find anything else. Maybe another bug or... ?


    EDIT: Would you have an approximation date for the v6.0.2 GPL to give please ?

  5. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    The bug ticket to which I was referring was EXTJS-19433. Does the issue occur for you if you use a very simple filefield test case outside of your application?

    I'm afraid I don't have any information about whether 6.0.2 will be released GPL.

  6. #5
    Sencha User
    Join Date
    Apr 2016
    Location
    Marseille, France
    Posts
    5

    Default

    Quote Originally Posted by Gary Schlosberg View Post
    The bug ticket to which I was referring was EXTJS-19433. Does the issue occur for you if you use a very simple filefield test case outside of your application?
    This ticket seems to correspond to my problem, I tried to create a simple Fiddle with my file field
    only, and I only have a "failure" on my handler, which seems legit.

    Quote Originally Posted by Gary Schlosberg View Post
    I'm afraid I don't have any information about whether 6.0.2 will be released GPL.
    Ok. I guess I was dreaming when I asked this question


    PS: Just noticed that v6.0.2 for support customer and v6.0.1 GPL got released almost on the same time. Does that mean that we'll have to wait for the v6.0.3 support customer to have a v6.0.2 GPL (which would correspond to 5/6months +/-) ?


    Thanks for clarifying the situation.

  7. #6
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Unfortunately I don't have any information about a 6.0.3 release, or whether 6.0.2 will be released as GPL.

Similar Threads

  1. filefield error in modern
    By dphil in forum Ext JS 6.x Bugs
    Replies: 1
    Last Post: 19 Apr 2016, 10:57 AM
  2. What FileField event to use for form.submit()
    By arnoldvillasanta in forum Ext: Q&A
    Replies: 2
    Last Post: 8 Jan 2015, 10:52 PM
  3. FileField is empty after submit.
    By Alexdinu in forum Ext.Direct
    Replies: 3
    Last Post: 6 Nov 2013, 6:47 AM

Tags for this Thread

Posting Permissions

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