Bug 998589 - Redirect name validation does not work
Redirect name validation does not work
Status: VERIFIED
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: Portal (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity unspecified
: DR01
: 6.1.1
Assigned To: Default User
Dominik Pospisil
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-19 10:36 EDT by Filip Kiss
Modified: 2013-12-06 07:58 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
An issue with redirect name validation causes a redirect to be created, even though the redirect name field is empty. To work-around this issue, move the cursor to another field to trigger the field validation correctly.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker GTNPORTAL-3266 Major Resolved Redirect Admin UI: Redirect still created if name is invalid (if input does not loses focus) 2014-02-20 04:43:12 EST

  None (edit)
Description Filip Kiss 2013-08-19 10:36:34 EDT
Steps to Reproduce:
1. open portal, sign in
2. go to redirect site
3. click add new redirect
4. delete current name (keep redirect name input element focused)
5. click save changes

Actual results:
redirect is created, even though name is empty (notification that name cannot be empty is displayed properly)

When redirect name input element does not remain focused, it works fine.
Comment 2 Boleslaw Dawidowicz 2013-09-12 08:11:38 EDT
Aimed for 6.1.1
Comment 3 JBoss JIRA Server 2013-09-27 14:54:11 EDT
Peter Palaga <ppalaga@redhat.com> made a comment on jira GTNPORTAL-3266

The submitted patch solves the problem on JBoss AS only. On Tomcat, the save button is still active and after clicking save the follwing error occurs on the console:
{code}org.chromattic.api.UndeclaredRepositoryException: javax.jcr.RepositoryException: Illegal relPath: ""
        at org.chromattic.core.DomainSession.getChild(DomainSession.java:364)
        at org.chromattic.core.ObjectContext.getChild(ObjectContext.java:241)
        at org.chromattic.core.mapper.onetomany.hierarchical.AnyChildMap.put(AnyChildMap.java:91)
        at org.chromattic.core.mapper.onetomany.hierarchical.AnyChildMap.put(AnyChildMap.java:32)
        at org.exoplatform.portal.pom.data.Mapper.save(Mapper.java:255)
        at org.exoplatform.portal.pom.config.tasks.PortalConfigTask$Save.run(PortalConfigTask.java:132)
        at org.exoplatform.portal.pom.config.tasks.PortalConfigTask$Save.run(PortalConfigTask.java:86)
        at org.exoplatform.portal.pom.config.POMSession.execute(POMSession.java:301)
        at org.exoplatform.portal.pom.config.ExecutorDispatcher.execute(ExecutorDispatcher.java:52)
        at org.exoplatform.portal.pom.config.TaskExecutionDecorator.execute(TaskExecutionDecorator.java:35)
        at org.exoplatform.portal.pom.config.cache.DataCache.write(DataCache.java:86)
        at org.exoplatform.portal.pom.config.cache.DataCache.execute(DataCache.java:60)
        at org.exoplatform.portal.pom.config.TaskExecutionDecorator.execute(TaskExecutionDecorator.java:35)
        at org.exoplatform.portal.pom.config.cache.PortalNamesCache.execute(PortalNamesCache.java:61)
        at org.exoplatform.portal.pom.config.POMSessionManager.execute(POMSessionManager.java:228)
        at org.exoplatform.portal.pom.config.POMDataStorage.save(POMDataStorage.java:127)
        at org.exoplatform.portal.config.DataStorageImpl.save(DataStorageImpl.java:80)
        at org.gatein.ui.admin.redirect.beans.EditRedirectBean.saveRedirect(EditRedirectBean.java:240)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.el.parser.AstValue.invoke(AstValue.java:278)
        at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
        at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101)
        at javax.faces.component.UICommand.broadcast(UICommand.java:315)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
        at org.jboss.portletbridge.bridge.controller.Jsf20ControllerImpl.renderFaces(Jsf20ControllerImpl.java:397)
        at org.jboss.portletbridge.bridge.controller.Jsf20ControllerImpl.renderFacesResource(Jsf20ControllerImpl.java:586)
        at org.jboss.portletbridge.bridge.controller.Jsf20ControllerImpl.renderResource(Jsf20ControllerImpl.java:289)
        at org.jboss.portletbridge.PortletBridgeImpl.doFacesRequest(PortletBridgeImpl.java:278)
        at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:467)
        at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:598)
        at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:184)
        at org.exoplatform.portal.application.ApplicationMonitoringFilter.doFilter(ApplicationMonitoringFilter.java:77)
        at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:184)
        at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:84)
        at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:529)
        at org.gatein.pc.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.gatein.pc.portlet.aspects.EventPayloadInterceptor.invoke(EventPayloadInterceptor.java:197)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.gatein.pc.portlet.aspects.RequestAttributeConversationInterceptor.invoke(RequestAttributeConversationInterceptor.java:119)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.gatein.pc.portlet.aspects.CCPPInterceptor.invoke(CCPPInterceptor.java:65)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.gatein.pc.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:49)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.gatein.pc.portlet.aspects.SessionInvalidatorInterceptor.invoke(SessionInvalidatorInterceptor.java:55)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.access$201(ContextDispatcherInterceptor.java:46)
        at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor$CallableImpl.call(ContextDispatcherInterceptor.java:119)
        at org.exoplatform.portal.webui.application.ExoServerContext$1.doCallback(ExoServerContext.java:49)
        at org.gatein.wci.command.CommandDispatcher$CallbackCommand.execute(CommandDispatcher.java:82)
        at org.gatein.wci.command.TomcatCommandDispatcher$1.execute(TomcatCommandDispatcher.java:61)
        at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.gatein.wci.command.CommandServlet.doGet(CommandServlet.java:135)
        at org.gatein.wci.command.CommandServlet.doPost(CommandServlet.java:166)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544)
        at org.gatein.wci.command.CommandServlet.include(CommandServlet.java:84)
        at org.gatein.wci.command.TomcatCommandDispatcher.include(TomcatCommandDispatcher.java:97)
        at org.gatein.wci.tomcat.TC7ServletContainerContext.include(TC7ServletContainerContext.java:111)
        at org.gatein.wci.ServletContainer.include(ServletContainer.java:393)
        at org.exoplatform.portal.webui.application.ExoServerContext.dispatch(ExoServerContext.java:45)
        at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:65)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.exoplatform.portal.pc.aspects.PortletLifecyclePhaseInterceptor.invoke(PortletLifecyclePhaseInterceptor.java:30)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.gatein.pc.portlet.aspects.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:69)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.gatein.pc.portlet.aspects.ValveInterceptor.invoke(ValveInterceptor.java:84)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.gatein.pc.portlet.container.ContainerPortletInvoker.invoke(ContainerPortletInvoker.java:131)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.gatein.pc.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:263)
        at org.gatein.pc.federation.impl.FederatedPortletInvokerService.invoke(FederatedPortletInvokerService.java:163)
        at org.gatein.pc.federation.impl.FederatingPortletInvokerService.invoke(FederatingPortletInvokerService.java:246)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.gatein.pc.portlet.aspects.PortletCustomizationInterceptor.invoke(PortletCustomizationInterceptor.java:76)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.gatein.pc.portlet.aspects.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:247)
        at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111)
        at org.exoplatform.portal.webui.application.UIPortlet.invoke(UIPortlet.java:981)
        at org.exoplatform.portal.webui.application.UIPortletActionListener$ServeResourceActionListener.execute(UIPortletActionListener.java:340)
        at org.exoplatform.webui.event.Event.broadcast(Event.java:97)
        at org.exoplatform.portal.webui.application.UIPortletLifecycle.processAction(UIPortletLifecycle.java:115)
        at org.exoplatform.portal.webui.application.UIPortletLifecycle.processAction(UIPortletLifecycle.java:54)
        at org.exoplatform.webui.core.UIComponent.processAction(UIComponent.java:119)
        at org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processAction(UIPortalApplicationLifecycle.java:73)
        at org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processAction(UIPortalApplicationLifecycle.java:36)
        at org.exoplatform.webui.core.UIComponent.processAction(UIComponent.java:119)
        at org.exoplatform.webui.core.UIApplication.processAction(UIApplication.java:123)
        at org.exoplatform.portal.webui.workspace.UIPortalApplication.processAction(UIPortalApplication.java:732)
        at org.exoplatform.portal.application.PortalRequestHandler.processRequest(PortalRequestHandler.java:210)
        at org.exoplatform.portal.application.PortalRequestHandler.execute(PortalRequestHandler.java:167)
        at org.exoplatform.web.WebAppController.service(WebAppController.java:340)
        at org.exoplatform.portal.application.PortalController.onService(PortalController.java:110)
        at org.exoplatform.container.web.AbstractHttpServlet.service(AbstractHttpServlet.java:132)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.exoplatform.web.filter.ExtensibleFilter$ExtensibleFilterChain.doFilter(ExtensibleFilter.java:96)
        at org.exoplatform.web.filter.ExtensibleFilter.doFilter(ExtensibleFilter.java:71)
        at org.exoplatform.web.filter.GenericFilter.doFilter(GenericFilter.java:70)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.exoplatform.web.CacheUserProfileFilter.doFilter(CacheUserProfileFilter.java:67)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.exoplatform.frameworks.jcr.web.ThreadLocalSessionProviderInitializedFilter.doFilter(ThreadLocalSessionProviderInitializedFilter.java:122)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.exoplatform.web.login.ConversationStateUpdateFilter.doFilter(ConversationStateUpdateFilter.java:66)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.exoplatform.services.security.web.SetCurrentIdentityFilter.doFilter(SetCurrentIdentityFilter.java:88)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.exoplatform.web.login.RememberMeFilter.doFilter(RememberMeFilter.java:81)
        at org.exoplatform.web.login.RememberMeFilter.doFilter(RememberMeFilter.java:49)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.gatein.security.oauth.webapi.OAuthDelegateFilter.doFilter(OAuthDelegateFilter.java:58)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.gatein.sso.integration.SSODelegateFilter.doFilter(SSODelegateFilter.java:60)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.exoplatform.container.web.PortalContainerFilter.doFilter(PortalContainerFilter.java:78)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.gatein.portal.installer.PortalSetupFilter.doFilter(PortalSetupFilter.java:62)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.gatein.portal.init.PortalCheckInitFilter.doFilter(PortalCheckInitFilter.java:66)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.gatein.sso.agent.tomcat.ServletAccessValve.invoke(ServletAccessValve.java:55)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)
Caused by: javax.jcr.RepositoryException: Illegal relPath: ""
        at org.exoplatform.services.jcr.impl.core.LocationFactory.parseNames(LocationFactory.java:248)
        at org.exoplatform.services.jcr.impl.core.LocationFactory.parseRelPath(LocationFactory.java:112)
        at org.exoplatform.services.jcr.impl.core.NodeImpl.hasNode(NodeImpl.java:1448)
        at org.chromattic.core.jcr.SessionWrapperImpl.getChild(SessionWrapperImpl.java:190)
        at org.chromattic.core.DomainSessionImpl._getChild(DomainSessionImpl.java:774)
        at org.chromattic.core.DomainSession.getChild(DomainSession.java:361)
        ... 166 more
{code}
Comment 4 JBoss JIRA Server 2013-10-03 03:22:21 EDT
Alexandre Mendonça <ammendonca@gmail.com> made a comment on jira GTNPORTAL-3266

This happens on Tomcat due to having javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL set to true, thus causing it not to submit the empty value ("") for validation, as it is null. This is not directly related to this issue/patch and a separate issue will be created to handle it.

It works properly and this patch fixes the issue for both JBoss AS and Tomcat for situations like name collision.
Comment 5 JBoss JIRA Server 2013-10-03 03:52:17 EDT
Peter Palaga <ppalaga@redhat.com> made a comment on jira GTNPORTAL-3266

Thanks for investigating, Alex. I'll merge the original PR.
Comment 6 Filip Kiss 2013-12-06 07:58:31 EST
Verified on DR01.

Note You need to log in before you can comment on or make changes to this bug.