[ 
https://issues.apache.org/jira/browse/OFBIZ-6708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14987751#comment-14987751
 ] 

Jacques Le Roux commented on OFBIZ-6708:
----------------------------------------

Actually the same happens for Company if you set the "Logo Image URL"  as 1st 
content and not public. It seems this is flawed and I see yet no real way to 
have it working well

> Missing userLogin error on party profile screen when 1st content is non public
> ------------------------------------------------------------------------------
>
>                 Key: OFBIZ-6708
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6708
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: Trunk
>            Reporter: Jacques Le Roux
>            Priority: Minor
>
> When a party 1st non content public the serveObjectData event is called in 
> party profile screen and it misses the userLogin in session.
> This was implemented with 
> [r1199681|http://svn.apache.org/viewvc?view=revision&revision=1199681] ([see 
> this|http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml?r1=1199681&r2=1199680&pathrev=1199681])
>  which is a back hack. I guess the idea was if a "Logo Image URL" was 
> assigned to a party like "Company" it should be displayed in the profile 
> screen, that works w/o  error in the log. But when you have a party 1st non 
> content of other type for other parties (like admin for instance) it does not 
> make sense, and show an error in log.
> {code}
>      [java] 2015-11-03 12:05:12,856 |ttp-bio-8443-exec-11 |DataEvents         
>            |E| null
>      [java] org.ofbiz.service.ServiceAuthException: User authorization is 
> required for this service: genericContentPermission
>      [java]     at 
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:356) 
> ~[ofbiz-service.jar:?]
>      [java]     at 
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) 
> ~[ofbiz-service.jar:?]
>      [java]     at 
> org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
>  ~[ofbiz-service.jar:?]
>      [java]     at 
> org.ofbiz.content.data.DataEvents.serveObjectData(DataEvents.java:139) 
> [ofbiz-content.jar:?]
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method) ~[?:1.8.0_51]
>      [java]     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
> ~[?:1.8.0_51]
>      [java]     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  ~[?:1.8.0_51]
>      [java]     at java.lang.reflect.Method.invoke(Method.java:497) 
> ~[?:1.8.0_51]
>      [java]     at 
> org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:92) 
> [ofbiz-webapp.jar:?]
>      [java]     at 
> org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:78) 
> [ofbiz-webapp.jar:?]
>      [java]     at 
> org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:759) 
> [ofbiz-webapp.jar:?]
>      [java]     at 
> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:476) 
> [ofbiz-webapp.jar:?]
>      [java]     at 
> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:213) 
> [ofbiz-webapp.jar:?]
>      [java]     at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:620) 
> [servlet-api-3.0.jar:?]
>      [java]     at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:727) 
> [servlet-api-3.0.jar:?]
>      [java]     at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:324) 
> [ofbiz-webapp.jar:?]
>      [java]     at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) 
> [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) 
> [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>  [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) 
> [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) 
> [tomcat-7.0.64-catalina.jar:7.0.64]
>      [java]     at 
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
>  [tomcat-7.0.64-tomcat-coyote.jar:7.0.64]
>      [java]     at 
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
>  [tomcat-7.0.64-tomcat-coyote.jar:7.0.64]
>      [java]     at 
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
>  [tomcat-7.0.64-tomcat-coyote.jar:7.0.64]
>      [java]     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  [?:1.8.0_51]
>      [java]     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  [?:1.8.0_51]
>      [java]     at 
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>  [tomcat-7.0.64-tomcat-coyote.jar:7.0.64]
>      [java]     at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]
>      [java] 2015-11-03 12:05:12,857 |ttp-bio-8443-exec-11 |RequestHandler     
>            |I| Ran Event 
> [java:org.ofbiz.content.data.DataEvents#serveObjectData] from [request], 
> result is [error]
>      [java] 2015-11-03 12:05:12,857 |ttp-bio-8443-exec-11 |RequestHandler     
>            |E| Request stream caused an error with the following message: 
> User authorization is required for this service: generic{code}
> I thought that passing the userLogin in session as in
> {code}
>                 <set field="setUserLogin" 
> value="${groovy:session.setAttribute('userLogin', userLogin)}"/> <!-- needed 
> by serveObjectData  -->
>                 <set field="partyContentId" 
> from-field="partyContentList[0].contentId"/>
>                 <set field="partyContent" value="${groovy: 
> partyContentId!=null?'/content/control/stream?contentId=' + partyContentId : 
> ''}"/>
> {code}
> would work, but for a reason it does not (still no userLogin in session, I 
> must do something wrong), and I have no longer time to investigate today...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to