Hi Jacques, thank you for your quick reply. Sorry for the inconvenience I hope the mail now arrives correctly.
I looked at the code you linked and realized that I expressed myself poorly. I don't think that changes at this point will cause problems. I rather think that there might have been changes in the rendering of the forms, because in OFBiz 17.x and 18.x the TimeSheets were still listed correctly and the code there also uses the empty strings (""). Possibly these empty strings are now becoming NullPointerExceptions due to a code change to the rendering. The exception informs about MacroFormRenderer: null at org.apache.ofbiz.widget.renderer.macro.MacroFormRenderer.makeHyperlinkByType(MacroFormRenderer.java:2918) ~[ofbiz.jar:?] Maybe the creation of the anchorElement fails because of this empty string, because the context is empty. final element anchorElement = WidgetWorker.makeHiddenFormLinkAnchorElement(linkStyle, encodedDescription, confirmation, modelFormField, request, context); writer.append(anchorElement.outerHtml()); <-- NullPointerException As requested, I have opened a ticket in the issue tracker: OFBIZ-12593 Thanks for your work, Tom On 2022/03/31 10:12:04 Jacques Le Roux wrote: > Hi Tom, > > Your message has been moderated, else it would not have reached this Mailing > List. > > Please subscribe to the user ML for such questions and then use your email > client. > See why here http://ofbiz.apache.org/mailing-lists.html. > > You will get a better support, people can answer you on the ML. > The wider the audience the better the answers you might get. > > Also it's more work for moderators who have to accept your messages as long > as you have not subscribed. > I'll personally no longer accept them (other moderators still could). > > This said it's actually a very old change: > https://svn.apache.org/viewvc?view=revision&revision=1682118 > Exactly: > https://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml?r1=1682118&r2=1682117&pathrev=1682118 > So no it was not an error put in with this change. > > And you are completely right, replacing "empty" by "Exists" not only fixes > the issue but redirect to the right location. The same change must be made > on line 88. > > Could you please not only subscribe but create a Jira issue in order to pack > all the thing correctly. Just follow: > https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Contributors+Best+Practices#OFBizContributorsBestPractices-HowtocreateaJiraissue > > TIA > > Jacques > > Le 30/03/2022 à 19:24, tom a écrit : > > Hello folks, > > > > I am writing to the mailing list for the first time, so I don't know if my > > request is right here. > > > > I use OFBiz among other things for time tracking using TimeSheets and would > > like to report a bug. > > > > Since version 22.01, but also on the trunk, there is a problem when listing > > timesheets using the form "ListFindTimeSheet" in > > https://github.com/apache/ofbiz-plugins/blob/trunk/projectmgr/widget/forms/TimeSheetForms.xml > > > > <https://github.com/apache/ofbiz-plugins/blob/trunk/projectmgr/widget/forms/TimeSheetForms.xml>. > > > > When calling a screen that embeds this form, a NullPointerException is > > displayed in the table in the "set to complete" column if the row to be > > displayed is a TimeSheet that has already been completed. > > > > If I completely stupidly replace "?complete:""}" with > > "?complete:"exists"}" in row 134 and 148, the error disappears > > and a hyperlink button with the text "exists" appears. I suspect that there > > has been a change that causes the empty string """" to cause a > > NullPointerException at some point. > > > > Kind regards, > > Tom > >
