PUBLIC - Liferay Faces
  1. PUBLIC - Liferay Faces
  2. FACES-1384

PrimeFaces p:fileUpload fails with two different portlets on the same page

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0-ga1, 3.0.3-ga4, 3.1.0-ga1, 3.1.3-ga4, 3.2.4-ga5
    • Fix Version/s: None
    • Component/s: Demos
    • Labels:
      None
    • Similar Issues:
      Show 5 results 

      Description

      This issue still exists in Primefaces 4.

      Steps to reproduce:

      1. Download and deploy the primefaces3-portlet within Liferay+Tomcat
      2. Add two instances of the portlet to the same portal page
      3. Upload files with the first portlet instance
      4. Upload files with the second portlet instance

      If the bug still exists, then the files will not appear in the list of the second portlet instance, and the following error will appear in the Tomcat log:

      22:21:16,451 ERROR [ExceptionHandlerAjaxImpl:57] viewId:/views/portletViewMode.xhtml - View /views/portletViewMode.xhtml could not be restored.
      javax.faces.application.ViewExpiredException: viewId:/views/portletViewMode.xhtml - View /views/portletViewMode.xhtml could not be restored.
      	at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:205)
      	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      	at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
      	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      	at com.liferay.faces.bridge.lifecycle.LifecycleWrapper.execute(LifecycleWrapper.java:35)
      	at com.liferay.faces.bridge.BridgePhaseResourceImpl.execute(BridgePhaseResourceImpl.java:99)
      	at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:116)
      	at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:178)
      	at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:118)
      	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)
      	at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:111)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      	...
      

      Related Primefaces Issue: Primefaces 6192

        Activity

        Hide
        Gustavo Campos added a comment -

        I'm not able to test it right now, but should this be a problem? Every portal (including Liferay) removes the h:head from each portlet and renders one h:head with all the css and scripts when rendering the whole page.

        Show
        Gustavo Campos added a comment - I'm not able to test it right now, but should this be a problem? Every portal (including Liferay) removes the h:head from each portlet and renders one h:head with all the css and scripts when rendering the whole page.
        Hide
        Neil Griffin added a comment -

        Hi Gustavo,

        Liferay Faces Bridge has a feature in which duplicate CSS/JS resources are removed. So for example, if there are two PrimeFaces portlets on the same portal page, then each portlet will try to add <script src="primefaces.js"></script> to the <head>...</head> section of the portal page. But Liferay Faces Bridge will ensure that only one will be there.

        The problem with file upload (this issue) was originally thought to be a problem with multiple copies of jquery on the same page, but that probably isn't the case. This issue hasn't been worked on by our team yet and so we don't currently know the cause.

        Neil

        Show
        Neil Griffin added a comment - Hi Gustavo, Liferay Faces Bridge has a feature in which duplicate CSS/JS resources are removed. So for example, if there are two PrimeFaces portlets on the same portal page, then each portlet will try to add <script src="primefaces.js"></script> to the <head>...</head> section of the portal page. But Liferay Faces Bridge will ensure that only one will be there. The problem with file upload (this issue) was originally thought to be a problem with multiple copies of jquery on the same page, but that probably isn't the case. This issue hasn't been worked on by our team yet and so we don't currently know the cause. Neil
        Hide
        Juan-José Vázquez added a comment -

        Hi all,

        Unfortunately we're facing the same problem in our site in production. It's a blocker issue for us that might force us to stop using the p:fileUpload component.

        Any progress in this issue would be really appreciated.

        Thanks in advance,

        Juanjo

        Show
        Juan-José Vázquez added a comment - Hi all, Unfortunately we're facing the same problem in our site in production. It's a blocker issue for us that might force us to stop using the p:fileUpload component. Any progress in this issue would be really appreciated. Thanks in advance, Juanjo
        Hide
        Kyle Stiemann added a comment -

        Hi all,
        Please vote for Primefaces Issue 6192 if you would like to see this fixed. Also if you are a Primefaces Pro user, it might be the case that you can get this issue fixed according to your Service Level Agreement (SLA).

        • Kyle
        Show
        Kyle Stiemann added a comment - Hi all, Please vote for Primefaces Issue 6192 if you would like to see this fixed. Also if you are a Primefaces Pro user, it might be the case that you can get this issue fixed according to your Service Level Agreement (SLA). Kyle
        Hide
        Neil Griffin added a comment -

        PrimeFaces Issue#6192 has been fixed.

        Kyle Stiemann When PrimeFaces 5.2 is released, please test and close this issue as "Fixed".

        Show
        Neil Griffin added a comment - PrimeFaces Issue#6192 has been fixed. Kyle Stiemann When PrimeFaces 5.2 is released, please test and close this issue as "Fixed".

          People

          • Assignee:
            Kyle Stiemann
            Reporter:
            Neil Griffin
          • Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:

              Development

                Structure Helper Panel