* [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug (OFBIZ-11762)
* [Improved]: Updated all ocurances where we only needed to pass the throwable object, without a message
- We have now added one more utility method to handle these cases. (OFBIZ-11762)
Co-authored-by: Priya Sharma <priya.sharma@example.com>
(OFBIZ-11064)
As we all know, Groovy is a powerful language with great built-in functions.
Groovy Truth[1] is one of them, which is not used properly in our code base.
We have used UtilValidate Class to validate arguments for Empty or NotEmpty,
which can easily be done in groovy with built-in functionality[1].
Current Code: if (UtilValidate.isNotEmpty(locations)) { ... }
Groovy Built-in Code: if (locations) { ... }
[1] - http://groovy-lang.org/semantics.html#Groovy-Truth
We need to careful for some points while we change this:
Like:
maxRetry = 0
if (!maxRetry)
{ // Not set, use a default maxRetry = -1 }
Because groovy evaluates zero to be false, it wouldn't be possible to set
maxRetry to zero. So it's best not to use groovy truth for null-checks on
numbers in some cases.
Thanks: Pawan Verma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860051 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10531)
I guess that when I worked on OFBIZ-9164 I broke that.
I found 3 occurences where the dispatcher was not in the session because the
session comes from the request and the request has not it in.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1838381 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10423)
Click on the left category, the page doesn't refresh, there are two issues.
productCategoryId not set in
ecommerce/groovyScripts/catalog/AjaxBreadcrumbs.groovy
updated data will fill in #div3, but the div id is missing in
ecommerce/widget/CommonScreens.xml
Thanks: Jason Hao
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1832800 13f79535-47bb-0310-9956-ffa450edef68
I found an inconsistency in the code for string comparison statusId.equals("PRUN_COMPLETED") whereas it should be written as "PRUN_COMPLETED".equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL.
Thanks Devanshu Vyas for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1795344 13f79535-47bb-0310-9956-ffa450edef68
showcontenttree page
(OFBIZ-9309)
Steps to reproduce:
1.Go to Ecommerce component https://localhost:8443/ecommerce/control/main
2.Click on any of the Content from "Browse Content" section of left panel.
It will be directed to https://localhost:8443/ecommerce/control/showcontenttree?contentId=STORE_POLICIES&nodeTrailCsv=STORE_POLICIES
3. Click on Search, it directs to https://localhost:8443/ecommerce/control/searchContent?siteId=STORE_POLICIES
4. Screen renders with ScreenRenderingException
Problem:
1. "searchContent" request directs to "searchContent" screen in
ContentScreens.xml.
2. On searchContent screen, "/ecommerce/groovyScripts/content/Search.groovy"
script prepares and hits a search query to Lucene.
3. "BooleanQuery" class is used to match documents with other boolean query
combinations.
4. BooleanQuery object is initialised with Its default constructor.
5. With Lucene 5.4.0, this constructor is deprecated.
OFBiz migrated to Lucene 6.3.1: OFBIZ-8316
Solution:
From Lucene 5.4.0 default constructor is deprecated and a new inner class
Builder is created for queries. Refer OFBIZ-9301 for detailed explanation.
Thanks: Aditya
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1790810 13f79535-47bb-0310-9956-ffa450edef68
At http://markmail.org/message/ffmyw773p65fndey I wrote:
I'd like to follow the suggestion I made in the last message of the linked
thread.
In other words, use
http://subversion.apache.org/docs/release-notes/1.8.html#repos-dictated-confighttp://blogs.collab.net/subversion/the-road-to-repository-dictated-configuration-day-2-autoprops
Then this problem would be over. No longer need to check from time to time that
concerned files, have svn:eol-style=native property set
This imply that all OFBiz users use svn > 1.7, but we can inform them, et voilà
Then at markmail.org/message/h3q2yvj4db544ro7 I wrote:
Actually, since we get new committers now and then and their are able to create
new files I have a warning every 6 months which says "Check Java
files, have all svn:eol-style=native" (I totally forgot that because I assume
the machine knows it and warns me ;))
I could extend that to all files (at least the most prominent types), I'll
see...
This does what the last sentence said for Groovy, XML and few new Birt
Java files.
I'll see if I can implement the svn 1.8 repos-dictated-config ASAP!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/plugins@1781219 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9167)
-go to https://localhost:8443/ordermgr/control/orderentry
-create order for DemoCustomer
-add an item
console output...
java.lang.NullPointerException
at org.apache.ofbiz.content.content.ContentWorker.
renderContentAsText(ContentWorker.java:368) ~[ofbiz.jar:?]
[...]
While at it I also found issues with cartLine.getName() in ftl files. It was
also missing the dispatcher.
This was broken by OFBIZ-9164
Thanks: Wai
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/plugins@1778889 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8231)
When I access url https://localhost:8443/ecommerce/control/viewprofile for my profile, State/Province display in addresses shows the geo-id, which is fine for US entities where the GeoID is the state code, but for non-us entities, the GeoID is often something like CountryCode-StateCode, which isn't very nice.
Thanks: fumiyoshi.to for report and patch
jleroux: I have slightly changed the patch for 2 reasons:
* check for null exceptions
* use not deprecated version of getRelatedOne()
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1760406 13f79535-47bb-0310-9956-ffa450edef68