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
        Gaurav Sharma added a comment -

        I'm facing this issue. Has any workaround been found yet? I'm assuming the cause is that since a copy of jQuery is loaded for each portlet on the page, the file component throws an error.

        Show
        Gaurav Sharma added a comment - I'm facing this issue. Has any workaround been found yet? I'm assuming the cause is that since a copy of jQuery is loaded for each portlet on the page, the file component throws an error.
        Hide
        Neil Griffin added a comment -

        Hi Gaurav,

        We haven't debugged this issue yet. However there should only be one copy of jQuery loaded, even if there are multiple PrimeFaces portlets on a portal page. We fixed that (for Liferay Portal) with FACES-1216.

        Neil

        Show
        Neil Griffin added a comment - Hi Gaurav, We haven't debugged this issue yet. However there should only be one copy of jQuery loaded, even if there are multiple PrimeFaces portlets on a portal page. We fixed that (for Liferay Portal) with FACES-1216 . Neil
        Hide
        Gaurav Sharma added a comment -

        Hi Neil,

        I'm not sure what needs to be done on my end to resolve the issue. The link that you give shows the issue marked as resolved.

        Gaurav

        Show
        Gaurav Sharma added a comment - Hi Neil, I'm not sure what needs to be done on my end to resolve the issue. The link that you give shows the issue marked as resolved. Gaurav
        Hide
        Gustavo Campos added a comment -

        Having the same problem with Liferay Portal 6.1.1 ga2 on JBoss 7.1 with Primefaces 3.5

        I have my upload portlet and my search portlet, after one upload the other portlet gives the ViewExpiredException.

        Show
        Gustavo Campos added a comment - Having the same problem with Liferay Portal 6.1.1 ga2 on JBoss 7.1 with Primefaces 3.5 I have my upload portlet and my search portlet, after one upload the other portlet gives the ViewExpiredException.
        Hide
        Neil Griffin added a comment -

        Similar issue in the forums, solved by removing h:head from other portlets on the same portal page:
        http://www.liferay.com/community/forums/-/message_boards/view_message/23106552#_19_message_23139842

        Show
        Neil Griffin added a comment - Similar issue in the forums, solved by removing h:head from other portlets on the same portal page: http://www.liferay.com/community/forums/-/message_boards/view_message/23106552#_19_message_23139842
        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

          People

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

            Dates

            • Created:
              Updated:

              Development

                Structure Helper Panel