ICEfaces
  1. ICEfaces
  2. ICE-10282

ACE File Upload not working in portal environment

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.BETA
    • Fix Version/s: 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Portal portlet
    • Assignee Priority:
      P1

      Description

      When trying to upload a file with any of the File Entry examples, errors are logged on both the server and the client:

      Server:

      java.lang.NullPointerException
      at org.icefaces.impl.util.DOMUtils.printNode(DOMUtils.java:298)
      at org.icefaces.impl.util.DOMUtils.printNodeCDATA(DOMUtils.java:286)
      at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:208)
      at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:430)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
      at com.liferay.faces.bridge.application.ViewHandlerCompatImpl.renderView(ViewHandlerCompatImpl.java:52)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
      at com.liferay.faces.bridge.BridgePhaseResourceImpl.execute(BridgePhaseResourceImpl.java:107)
      at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:128)
      at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:178)
      at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:122)
      at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:82)
      at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:116)
      at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)
      at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:112)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)


      Client

      POST http://localhost:8080/web/guest/sc-solo?p_p_id=fileEntry_WAR_showcaseportle…&_fileEntry_WAR_showcaseportlet__facesViewIdResource=%2Fportlet-view.xhtml net::ERR_CONTENT_DECODING_FAILED sc-solo?p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2&p_p_state=norm…fileEntry_WAR_showcaseportlet__facesViewIdResource=%2Fportlet-view.xhtml:1
      POST http://localhost:8080/web/guest/sc-solo?p_p_id=fileEntry_WAR_showcaseportle…&_fileEntry_WAR_showcaseportlet__facesViewIdResource=%2Fportlet-view.xhtml net::ERR_CONTENT_DECODING_FAILED sc-solo?p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2&p_p_state=norm…fileEntry_WAR_showcaseportlet__facesViewIdResource=%2Fportlet-view.xhtml:1
      Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://localhost:8080" from accessing a frame with origin "null". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "data". Protocols must match.

        Activity

        Deryk Sinotte created issue -
        Deryk Sinotte made changes -
        Field Original Value New Value
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Deryk Sinotte made changes -
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Ken Fyten made changes -
        Assignee Mircea Toma [ mircea.toma ]
        Fix Version/s 4.0 [ 11382 ]
        Assignee Priority P1 [ 10010 ]
        Hide
        Mircea Toma added a comment -

        Modified ace:fileEntry to provide the view state key in the encodeURL field so that the state key can be read in portal environment and run the restore phase as expected. Also modified FileEntryUpload to read the 'file-entry-id' parameter of the parameter map extracted from the request's body.

        Show
        Mircea Toma added a comment - Modified ace:fileEntry to provide the view state key in the encodeURL field so that the state key can be read in portal environment and run the restore phase as expected. Also modified FileEntryUpload to read the 'file-entry-id' parameter of the parameter map extracted from the request's body.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #42658 Mon Sep 29 15:47:49 MDT 2014 mircea.toma ICE-10282 Modified ace:fileEntry to provide the view state key in the encodeURL field so that the state key can be read in portal environment. Also modified FileEntryUpload to read the 'file-entry-id' parameter of the parameter map extracted from the request's body.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/fileentry/FileEntryUpload.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/fileentry/FileEntryFormSubmit.java
        Hide
        Deryk Sinotte added a comment -

        All of the File Entry examples now work except for the Validation one. The size validation slider starts at a file size of 0KB and trying to upload a file results in it being invalid. This is correct because it exceeds the allowed size. However, changing the slider to a different value (e.g. 200KB) doesn't seem to work as all future uploads are still validated against the 0KB limit. It appears that the change to the slider value is not being transferred and/or persisted.

        Show
        Deryk Sinotte added a comment - All of the File Entry examples now work except for the Validation one. The size validation slider starts at a file size of 0KB and trying to upload a file results in it being invalid. This is correct because it exceeds the allowed size. However, changing the slider to a different value (e.g. 200KB) doesn't seem to work as all future uploads are still validated against the 0KB limit. It appears that the change to the slider value is not being transferred and/or persisted.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #42672 Wed Oct 01 13:25:38 MDT 2014 mircea.toma ICE-10282 Added ice.window and ice.view parameters to the encoded URL of the uploading form so that window and view scopes are setup.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/fileentry/FileEntryFormSubmit.java
        Hide
        Mircea Toma added a comment -

        Added ice.window and ice.view parameters to the encoded URL of the uploading form so that window and view scopes are setup during request processing. In this case the window scoped bean holding the maximum file size is properly looked up instead of being re-instantiated like previously to this fix (with the maximum value set to zero).

        Show
        Mircea Toma added a comment - Added ice.window and ice.view parameters to the encoded URL of the uploading form so that window and view scopes are setup during request processing. In this case the window scoped bean holding the maximum file size is properly looked up instead of being re-instantiated like previously to this fix (with the maximum value set to zero).
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Deryk Sinotte added a comment -

        Closing as I re-ran it in my environment and everything seems good with the validation slider now.

        Show
        Deryk Sinotte added a comment - Closing as I re-ran it in my environment and everything seems good with the validation slider now.
        Deryk Sinotte made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: