[JBoss JIRA] (RF-13719) rich.fileUpload breaks form action in portal
by Anurag Debnath (JIRA)
[ https://issues.jboss.org/browse/RF-13719?page=com.atlassian.jira.plugin.s... ]
Anurag Debnath updated RF-13719:
--------------------------------
> rich.fileUpload breaks form action in portal
> --------------------------------------------
>
> Key: RF-13719
> URL: https://issues.jboss.org/browse/RF-13719
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-input
> Affects Versions: 4.3.5
> Environment: JBoss Portal 6.1.1
> Reporter: Jonáš Trantina
> Labels: gss
> Attachments: reproducer.zip, reproducer2.zip
>
>
> When a rich:fileUpload si submitted (i.e. files are uploaded) action of the form is not preserved well.
> In fileupload.js __submit method there is the following code:
> {code:JavaScript}
> var encodedURLInputs = this.form.children("input[name='javax.faces.encodedURL']");
> var originalAction = encodedURLInputs.length > 0 ? encodedURLInputs.val() : this.form.attr("action");
> {code}
> the var "originalAction" is then used to revert to the original action url of the form. However, encodedURLInputs and form action prop does not contain the same url. Because encodedURLInputs has bigger priority URL from that input is restored into the form and not the original form action. This breaks the form as the next submission fails.
> In portal the solution is
> {code:JavaScript}
> var originalFormAction =this.form.attr("action");
> {code}
> and then restore "originalFormAction" instead of "originalAction", but I am not sure if this doesn't break anything in other environments.
> Is this a bug in richfaces or is the content of input[name='javax.faces.encodedURL'] set badly?
> To reproduce you can use the reproducer attached.
> Example URLs:
> form action
> {code}
> /portal/classic/home/uploadform?portal:componentId=834fa198-ff3d-4a5c-a1c7-33c85e8a410d&interactionstate=JBPNS_rO0ABXcsABBfanNmQnJpZGdlVmlld0lkAAAAAQALL2hvbWUueGh0bWwAB19fRU9GX18*&portal:type=action
> {code}
> input[name='javax.faces.encodedURL']
> {code}
> /portal/classic/home/uploadform?portal:windowState=normal&portal:componentId=834fa198-ff3d-4a5c-a1c7-33c85e8a410d&portal:cacheLevel=PAGE&resourcestate=JBPNS_rO0ABXdAABBfanNmQnJpZGdlVmlld0lkAAAAAQALL2hvbWUueGh0bWwACF9wYnJBamF4AAAAAQAEdHJ1ZQAHX19FT0ZfXw**&portal:type=resource&portal:portletMode=view
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13719) rich.fileUpload breaks form action in portal
by Martin Weiler (JIRA)
[ https://issues.jboss.org/browse/RF-13719?page=com.atlassian.jira.plugin.s... ]
Martin Weiler updated RF-13719:
-------------------------------
> rich.fileUpload breaks form action in portal
> --------------------------------------------
>
> Key: RF-13719
> URL: https://issues.jboss.org/browse/RF-13719
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-input
> Affects Versions: 4.3.5
> Environment: JBoss Portal 6.1.1
> Reporter: Jonáš Trantina
> Labels: gss
> Attachments: reproducer.zip, reproducer2.zip
>
>
> When a rich:fileUpload si submitted (i.e. files are uploaded) action of the form is not preserved well.
> In fileupload.js __submit method there is the following code:
> {code:JavaScript}
> var encodedURLInputs = this.form.children("input[name='javax.faces.encodedURL']");
> var originalAction = encodedURLInputs.length > 0 ? encodedURLInputs.val() : this.form.attr("action");
> {code}
> the var "originalAction" is then used to revert to the original action url of the form. However, encodedURLInputs and form action prop does not contain the same url. Because encodedURLInputs has bigger priority URL from that input is restored into the form and not the original form action. This breaks the form as the next submission fails.
> In portal the solution is
> {code:JavaScript}
> var originalFormAction =this.form.attr("action");
> {code}
> and then restore "originalFormAction" instead of "originalAction", but I am not sure if this doesn't break anything in other environments.
> Is this a bug in richfaces or is the content of input[name='javax.faces.encodedURL'] set badly?
> To reproduce you can use the reproducer attached.
> Example URLs:
> form action
> {code}
> /portal/classic/home/uploadform?portal:componentId=834fa198-ff3d-4a5c-a1c7-33c85e8a410d&interactionstate=JBPNS_rO0ABXcsABBfanNmQnJpZGdlVmlld0lkAAAAAQALL2hvbWUueGh0bWwAB19fRU9GX18*&portal:type=action
> {code}
> input[name='javax.faces.encodedURL']
> {code}
> /portal/classic/home/uploadform?portal:windowState=normal&portal:componentId=834fa198-ff3d-4a5c-a1c7-33c85e8a410d&portal:cacheLevel=PAGE&resourcestate=JBPNS_rO0ABXdAABBfanNmQnJpZGdlVmlld0lkAAAAAQALL2hvbWUueGh0bWwACF9wYnJBamF4AAAAAQAEdHJ1ZQAHX19FT0ZfXw**&portal:type=resource&portal:portletMode=view
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13719) rich.fileUpload breaks form action in portal
by Anurag Debnath (JIRA)
[ https://issues.jboss.org/browse/RF-13719?page=com.atlassian.jira.plugin.s... ]
Anurag Debnath updated RF-13719:
--------------------------------
> rich.fileUpload breaks form action in portal
> --------------------------------------------
>
> Key: RF-13719
> URL: https://issues.jboss.org/browse/RF-13719
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-input
> Affects Versions: 4.3.5
> Environment: JBoss Portal 6.1.1
> Reporter: Jonáš Trantina
> Labels: gss
> Attachments: reproducer.zip, reproducer2.zip
>
>
> When a rich:fileUpload si submitted (i.e. files are uploaded) action of the form is not preserved well.
> In fileupload.js __submit method there is the following code:
> {code:JavaScript}
> var encodedURLInputs = this.form.children("input[name='javax.faces.encodedURL']");
> var originalAction = encodedURLInputs.length > 0 ? encodedURLInputs.val() : this.form.attr("action");
> {code}
> the var "originalAction" is then used to revert to the original action url of the form. However, encodedURLInputs and form action prop does not contain the same url. Because encodedURLInputs has bigger priority URL from that input is restored into the form and not the original form action. This breaks the form as the next submission fails.
> In portal the solution is
> {code:JavaScript}
> var originalFormAction =this.form.attr("action");
> {code}
> and then restore "originalFormAction" instead of "originalAction", but I am not sure if this doesn't break anything in other environments.
> Is this a bug in richfaces or is the content of input[name='javax.faces.encodedURL'] set badly?
> To reproduce you can use the reproducer attached.
> Example URLs:
> form action
> {code}
> /portal/classic/home/uploadform?portal:componentId=834fa198-ff3d-4a5c-a1c7-33c85e8a410d&interactionstate=JBPNS_rO0ABXcsABBfanNmQnJpZGdlVmlld0lkAAAAAQALL2hvbWUueGh0bWwAB19fRU9GX18*&portal:type=action
> {code}
> input[name='javax.faces.encodedURL']
> {code}
> /portal/classic/home/uploadform?portal:windowState=normal&portal:componentId=834fa198-ff3d-4a5c-a1c7-33c85e8a410d&portal:cacheLevel=PAGE&resourcestate=JBPNS_rO0ABXdAABBfanNmQnJpZGdlVmlld0lkAAAAAQALL2hvbWUueGh0bWwACF9wYnJBamF4AAAAAQAEdHJ1ZQAHX19FT0ZfXw**&portal:type=resource&portal:portletMode=view
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13726) partialViewContext.release triggering assertNotReleased
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13726?page=com.atlassian.jira.plugin.s... ]
Brian Leathem resolved RF-13726.
--------------------------------
Resolution: Duplicate Issue
> partialViewContext.release triggering assertNotReleased
> -------------------------------------------------------
>
> Key: RF-13726
> URL: https://issues.jboss.org/browse/RF-13726
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 4.3.7
> Environment: JSF 2.2 Mojarra + Richfaces 4.3
> Eclipse + Tomcat
> Reporter: mel turphin
> Priority: Critical
>
> when the release method is called on
> com.sun.faces.context.FacesContextImpl
> the first thing that is done is to mark relased=true
>
> released = true;
> later on partialViewContext.release can be called
> partialViewContext.release();
> this is following some set of calls that ends with getAttributes and assertNotReleased raising an exception since the context was already marked as released
> ExtendedPartialViewContextImpl
> org.richfaces.context.ExtendedPartialViewContext.release()
> setInstance(facesContext, null);
> facesContext.getAttributes().put(ATTRIBUTE_NAME, instance);
> getAttributes --> assertNotReleased();
> stack trace:
> SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/rf43] threw exception
> java.lang.IllegalStateException
> at com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:705)
> at com.sun.faces.context.FacesContextImpl.getAttributes(FacesContextImpl.java:237)
> at org.richfaces.context.ExtendedPartialViewContext.setInstance(ExtendedPartialViewContext.java:55)
> at org.richfaces.context.ExtendedPartialViewContext.release(ExtendedPartialViewContext.java:64)
> at org.richfaces.context.ExtendedPartialViewContextImpl.release(ExtendedPartialViewContextImpl.java:424)
> at com.sun.faces.context.FacesContextImpl.release(FacesContextImpl.java:591)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:665)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> at java.lang.Thread.run(Thread.java:744)
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months