|
Naofumi Fukue created OFBIZ-5073:
------------------------------------ Summary: My Portal Preferences error Key: OFBIZ-5073 URL: https://issues.apache.org/jira/browse/OFBIZ-5073 Project: OFBiz Issue Type: Bug Components: framework Environment: demo site https://demo-stable.ofbiz.apache.org/myportal Reporter: Naofumi Fukue Select My Portal > Preferences, displays bellow error. org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.NullPointerException (null) Reverting org/ofbiz/widget/WidgetWorker.java previous latest OFBIZ-2628 bug fix, then the problem recovered. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
[ https://issues.apache.org/jira/browse/OFBIZ-5073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502718#comment-13502718 ] Olivier Heintz commented on OFBIZ-5073: --------------------------------------- After reading commit Trunk @Rev1392766 about OFBIZ-2628, I do not saw a relation with portal. So I have make correction at the screen / form level before in Form {code} <field name="portalPageId" title="${uiLabelMap.CommonEdit}"> <hyperlink description="${uiLabelMap.CommonEdit}" target="ManagePortalPages"> <parameter param-name="portalPageId"/> <parameter param-name="parentPortalPageId" from-field="parameters.parentPortalPageId"/> </hyperlink> </field> {code} and I have as result in the web browser the error message and in source {code} <input name="parentPortalPageId" value=" <html> <head> <title>Open For Business Message</title> <meta http-equiv=" {code} After, I have added in action part of screen {code} <set field="parentPortalPageId" from-field="parameters.parentPortalPageId"/> {code} and in Form, i have changed {code} <field name="portalPageId" title="${uiLabelMap.CommonEdit}"> <hyperlink description="${uiLabelMap.CommonEdit}" target="ManagePortalPages"> <parameter param-name="portalPageId"/> <parameter param-name="parentPortalPageId"/> </hyperlink> </field> {code} And now, all is fine. I not understand why the initial solution not works (but I not understand the content of @Rev1392766 commit, it's too technic for me ). Hoping that it helps to find the proper correction. > My Portal Preferences error > --------------------------- > > Key: OFBIZ-5073 > URL: https://issues.apache.org/jira/browse/OFBIZ-5073 > Project: OFBiz > Issue Type: Bug > Components: framework > Environment: demo site https://demo-stable.ofbiz.apache.org/myportal > Reporter: Naofumi Fukue > > Select My Portal > Preferences, displays bellow error. > org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.NullPointerException (null) > Reverting org/ofbiz/widget/WidgetWorker.java previous latest OFBIZ-2628 bug fix, then the problem recovered. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-5073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507455#comment-13507455 ] Olivier Heintz commented on OFBIZ-5073: --------------------------------------- After 2 hours :-( find the reason and maybe a solution solution proposed : {code} +++ framework/widget/src/org/ofbiz/widget/WidgetWorker.java (copie de travail) @@ -289,7 +289,7 @@ writer.append(key); writer.append("\" value=\""); - String valueFromContext = context.containsKey(key) ? + String valueFromContext = context.containsKey(key) && context.get(key)!= null ? context.get(key).toString() : parameter.getValue(); writer.append(valueFromContext); writer.append("\" type=\"hidden\"/>"); {code} the problem is visible on ListPortalPages, which list all portalPage-GenericValue for one parentportalPageId received in parameters. parentPortalPageId is a field of PortalPage-GenericValue, so context contain parentPortalPageid as genericValue field and in this case value is null. I don't understand the previous patch done @Rev1392766 about OFBIZ-2628 : {code} - writer.append(parameter.getValue()); + + String valueFromContext = context.containsKey(key) ? + context.get(key).toString() : parameter.getValue(); + writer.append(valueFromContext); {code} because with the @Rev1392766 patch, value will be genericValue.field and not the from-field form. The solution I propose works in the ListPortalPages list, but in some other case @Rev1392766 patch (even with my correction) with generate wrong value. > My Portal Preferences error > --------------------------- > > Key: OFBIZ-5073 > URL: https://issues.apache.org/jira/browse/OFBIZ-5073 > Project: OFBiz > Issue Type: Bug > Components: framework > Environment: demo site https://demo-stable.ofbiz.apache.org/myportal > Reporter: Naofumi Fukue > > Select My Portal > Preferences, displays bellow error. > org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.NullPointerException (null) > Reverting org/ofbiz/widget/WidgetWorker.java previous latest OFBIZ-2628 bug fix, then the problem recovered. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-5073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Heintz updated OFBIZ-5073: ---------------------------------- Attachment: OFBIZ-5073.patch > My Portal Preferences error > --------------------------- > > Key: OFBIZ-5073 > URL: https://issues.apache.org/jira/browse/OFBIZ-5073 > Project: OFBiz > Issue Type: Bug > Components: framework > Environment: demo site https://demo-stable.ofbiz.apache.org/myportal > Reporter: Naofumi Fukue > Attachments: OFBIZ-5073.patch > > > Select My Portal > Preferences, displays bellow error. > org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.NullPointerException (null) > Reverting org/ofbiz/widget/WidgetWorker.java previous latest OFBIZ-2628 bug fix, then the problem recovered. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
| Free forum by Nabble | Edit this page |
