[CLOSED] form.submit crashes if you don't pass "headers"

  1. #1

    [CLOSED] form.submit crashes if you don't pass "headers"

    This used to work beautifully 4.2. We migrated to 4.4 and start observing this issue. We are using plain ExtJS javascript snipped upload file.

    onUploadFile: function (field, value) {
    var form = this.lookupReference('uploadForm').getForm();
    form.submit({
    url: '../../api/bom/upload/excel',
    scope: this,
    waitMsg: 'Reading Bom file...',
    success: function (fp, o) {
    console.log('success');
    }
    });

    Get the following error as we submit form.
    Click image for larger version. 

Name:	Capture.PNG 
Views:	89 
Size:	11.4 KB 
ID:	25037
    Last edited by fabricio.murta; Oct 20, 2017 at 5:58 PM. Reason: The user has solved their issue.
  2. #2
    Hello @shahidmughal!

    This really looks like a bug related to the recent file upload field bug. ExtJS 6.5.0 brought an unilateral change that broken form submissions on such scenarios. Although we applied a fix that worked in the reported use case scenarios, maybe your case is exploring something else.

    As you apparently are using pure ExtJS, maybe then the problem would be because we fixed it when the server-side calls are made from Ext.NET related code (Direct Events or Methods), and you may need to adequate your form submission to comply to those compulsory changes from ExtJS.

    Anyway, we can't provide you further assistance unless you provide us a test case we can reproduce the issue with. No problem if you are not really using Ext.NET, but we'd require something we can run and reproduce the error you are facing. In other words, we need a test case in accordance to the guidelines provided in this thread: More Information Required.

    Looking forward to your follow-up so we can proceed with the assistance.
    Fabrício Murta
    Developer & Support Expert
  3. #3

    form.submit crashes if you don't pass "headers"

    Thanks Fabricio for your quick reply and assistance. I always appreciate your responsiveness. You are right that the issue is related to recent ExtJS unilateral change. We resolved the issue by adding a custom header. We wouldn't have this issue if we had used the DirectMethod for posting. We have a large application and some code uses ExtJS directly. We like the beautiful design and architecture by your team that allows us to do that. Though this is the first time we face this issue where Ext.Net override broke the code.

    We are good now but expect you will continue to support Ext.Net and ExtJS use simultaneously.
  4. #4
    Hello, @shahidmughal! Thanks for your kind words!

    We do support standalone ExtJS as long as run from the ASP.NET subsystem which, for example, allocates overrides and fixes we apply to the client side code during the page load. So we won't turn back support requests for standalone ExtJS code as we understand some custom behaviors will depend on that.

    As for your actual problem here, we're glad you could find a solution that works for you. The ExtJS compulsory changes are but a possibility as we were not actually able to run your code on our side, for which we will require a runnable code sample.

    Let me just clarify one point:

    Though this is the first time we face this issue where Ext.Net override broke the code.
    The fact I shared was not this, but the opposite. I'll summarize it below. Again, as we didn't have a runnable test case from you, we can't say for sure this is the exact issue you are facing. What we can say is the issue below is related to forms with files attached.

    - ExtJS introduced a change with form uploads that was not backward compatible.
    - We believe the reason for that was to mitigate memory leaks in some situations pertaining exclusively to ExtJS.
    - This behavior brought issues to Ext.NET server-side interaction
    - We applied a fix that affects exclusively Ext.NET interaction with ExtJS, preserving the Sencha implementation whenever Ext.NET is not directly involved in the transaction.

    Of course, the fact we write overrides can incur into undesired side effects. But this was exactly what we tried to avoid here. We just mitigated the breaking change for when Ext.NET is involved and let the breaking change (that was not documented by Sencha) prevail, as trying to generically "fix" it would probably just introduce back the issue they addressed.

    I hope it is all clear, we're here to help, sorry for any inconvenience or mislead this may have brought.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 9
    Last Post: Mar 25, 2014, 6:51 AM
  2. [CLOSED] Type="Submit" not working anymore
    By reinout.mechant@imprss.be in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Jun 18, 2013, 10:15 PM
  3. Replies: 1
    Last Post: May 13, 2013, 2:40 PM
  4. ext:window with Layout="Form" and submit
    By TheAlchemistBR in forum 1.x Help
    Replies: 2
    Last Post: Jan 23, 2012, 10:50 AM
  5. Replies: 2
    Last Post: Jun 26, 2011, 1:59 AM

Posting Permissions