Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6817

Exception throwing use-case when using upload field within $tabbedForm layout

    XMLWordPrintable

Details

    • Initiative
    • Resolution: Obsolete
    • Neutral
    • None
    • None
    • None
    • None

    Description

      Reproduction steps:

      • Add upload field with maxUploadSize property to tabbed form
      • upload a large enough file (btw. there is no indicators here to let user know file is uploading, just upload button is disabled)
      • switch to other tab and back, now the upload button is enabled again
      • upload another file

      Expected (before MGNLUI-6390):

      • last selected file is eventually uploaded in field

      Actual (after MGNLUI-6390):

      • exception is thrown

      Dev notes:

      com.vaadin.server.UploadException: Upload failed
       at com.vaadin.server.communication.FileUploadHandler.streamToReceiver(FileUploadHandler.java:642) ~[vaadin-server-8.13.1.jar:8.13.1]
       at com.vaadin.server.communication.FileUploadHandler.handleFileUploadValidationAndData(FileUploadHandler.java:469) [vaadin-server-8.13.1.jar:8.13.1]
       at com.vaadin.server.communication.FileUploadHandler.doHandleSimpleMultipartFileUpload(FileUploadHandler.java:422) [vaadin-server-8.13.1.jar:8.13.1]
       at com.vaadin.server.communication.FileUploadHandler.handleRequest(FileUploadHandler.java:299) [vaadin-server-8.13.1.jar:8.13.1]
       at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1608) [vaadin-server-8.13.1.jar:8.13.1]
       at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:448) [vaadin-server-8.13.1.jar:8.13.1]
       at info.magnolia.admincentral.AdmincentralServlet.service(AdmincentralServlet.java:119) [magnolia-admincentral-6.2.12-SNAPSHOT.jar:?]
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [servlet-api.jar:?]
       at info.magnolia.cms.filters.ServletDispatchingFilter.doFilter(ServletDispatchingFilter.java:148) [magnolia-core-6.2.12-SNAPSHOT.jar:?]
       at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) [magnolia-core-6.2.12-SNAPSHOT.jar:?]
       ...
       at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
       Caused by: java.lang.IllegalStateException: uploading already started
       at com.vaadin.ui.Upload.startUpload(Upload.java:900) ~[vaadin-server-8.13.1.jar:8.13.1]
       at com.vaadin.ui.Upload$2.streamingStarted(Upload.java:1136) ~[vaadin-server-8.13.1.jar:8.13.1]
       at com.vaadin.server.communication.FileUploadHandler.streamToReceiver(FileUploadHandler.java:559) ~[vaadin-server-8.13.1.jar:8.13.1]
       ... 91 more

      see https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/pull-requests/1841/overview?commentId=83510

      Attachments

        Activity

          People

            Unassigned Unassigned
            asiska Adam Siska
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: