(OFBIZ-9164)
If you go at: catalog/control/main then open the lookup on the left for category
id, click the first category (20111) and then click on search, you will be
prompted with this:
java.lang.IllegalArgumentException: Error running script at location
[component://product/groovyScripts/catalog/find/KeywordSearch.groovy]:
java.lang.NullPointerException
This is the result of the changes I made for this issue 1.5 years ago.
I missed the case where a null is passed instead of a dispatcher in
getProductCategoryContentAsText()
which is then used inside of getProductCategoryContentAsText:
ContentWorker.renderContentAsText()
The problem is, that the method renderContentAsText as a result of my changes
uses the dispatcher to get the delegator.
Because the dispatcher is a given a null value at this point, this results in a
null pointer.
The solution was to introduce and abstract prettyPrintConstraint method with a
LocalDispatcher as argument and to implement it in CategoryConstraint class.
Other implementations don't use getProductCategoryContentAsText so can simply
return null. They will not be used anywhere anyway.
CatalogConstraint.prettyPrintConstraint with a delegator is now not
used OOTB but I prefer to keep its implementation for custom projects which
might use it in other circumstances. I though put a TODO to possibly simply
return null.
Also while at it remove a unused requestParams variable in ProductSearchSession
Thanks: Dennis Balkir for the detailed reporting
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835891 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10396)
Currently, everywhere in code base, before creating new party contact mech record, we use
deletePartyContactMechPurposeIfExists service to delete old records. But, problem is
<first-from-list is used everywhere which only deletes first fetched record.
All previous records should also gets deleted before creating new party contact mech purpose for a specific purpose type.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835871 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10472)
At the same time renames setLocaleFromBrowser to SetTimeZoneFromBrowser
everywhere it's needed
And adds a documentation about the auth mismatch as suggested by Mathieu
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835628 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10460)
The setLocaleFromBrowser request map defined in common-controller.xml has an
attribute of auth=false
While the service associated with it in framework/common/servicedef/services.xml
has an attribute of auth=true.
jleroux: this was missing in the initial patch. At OFBIZ-9264 the description is
"it sets the time zone of the user logged in to it's browser time zone."
So being logged in seems needed, hence better to set auth=true everywhere
Thanks: as reported by Deepak in OFBIZ-10460 there is a problem with that.
So we need keep the inconsistence and the service protected.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835616 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10473)
As discussed on OFBIZ-10467, override the upper case styling with a more specific rule in Tomahawk theme to avoid upper casing of small case letters for alphabetical index of the service engine page
Thanks: Dennis Balkir, Pierre Smits & Jacques Le Roux for the discussion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835613 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10467)
To give OFBiz a more equal look, the style buttontext can be added for the alphabetical index of the service engine main page.
This makes the buttons look alike with the ones that are already there for the entity engine main page.
Thanks: Dennis Balkir for patch and Pierre Smits & Jacques Le Roux for the discussion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835612 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10460)
The setLocaleFromBrowser request map defined in common-controller.xml has an
attribute of auth=false
While the service associated with it in framework/common/servicedef/services.xml
has an attribute of auth=true.
jleroux: this was missing in the initial patch. At OFBIZ-9264 the description is
"it sets the time zone of the user logged in to it's browser time zone."
So being logged in seems needed, hence better to set auth=true everywhere
Thanks: Mathieu Lirzin for report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835586 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10471)
As Deepak mentioned in r1816537, currenlty setLocaleFromBrowser is called each
time a page is refreshed.
We can use sessionStorage to have it called only once by session
Thanks: Deepak for reporting an issue which was boring me for long :)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835585 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10008)
No configurations is available to disable usage of EntitySyncRemove.
And it's creating problems when having a large database and frequent delete
operations.
saveEntitySyncRemoveInfo is used to create EntitySyncRemove records in
GenericDelegator.removeValue() and removeByPrimaryKey().
This adds a mechanism to prevent the usage of EntitySyncRemove by adding a
property in general.properties file used to configure in entityengine.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835296 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10031)
Fixes an issue with previous patch.
The problem was, that the value newEntity was made with the parameters map,
which resulted in a value, which didn't had the sequenced id, that I tried to
fix.
But after removing the map, everything works just fine
Thanks: Dennis Balkir
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835295 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10458)
A new Junit test is implemented to validate that no duplicates are present.
Groovy service has been refactored to use a more functional style
Thanks Mathieu Lirzin for reporting and providing the patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835282 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10249)
In some country (like european) you need to indicate on your sales invoice where you ship the finish good product related.
To help this case, I added a new worker function (InvoiceWorker.getShippingAddress) to found information from an invoice and improve the generic EditInvoice.groovy and the invoice ftl template to display it as example.
To homogenize postal address displaying with order I use the subscreen PartyScreens.xml#postalAddressPdfFormatter on the invoice ftl template
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835028 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10437)
With r1832307, the code that adds the id attribute to form was missing and the attribute autocomplete was repeated twice.
Thanks: Wei and Jacques for discovering the issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834816 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10455)
At r1812161 for OFBIZ-9674 we updated com.lowagie:itext license from 2.1.7 to
4.2.0. Scott mentionned at https://s.apache.org/ixHW:
<<I just noticed that the iText maven bundle is a bit tricksy and includes iText
5.6.6 as a dependency, with the latter being GPL licensed.>>
Actually Scott meant itextpdf (was clear in his message), and it turned out that
not only itextpdf was a problem but the 4.2.0 version in its entirety as
discovered in the thread.
The solution is to get back to the 2.1.7 version which is still MPL licensed.
Thanks: Scott for discovering the issue and others for the discussion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834736 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10453)
There is a lot of repetitive code in ConfigXMLReader.
Using a functional interface as a parameter of a generic algorithm avoids those
repetitions.
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834662 13f79535-47bb-0310-9956-ffa450edef68
OFBIZ-10438
The request-map element has a new method attribute to control a uri be called by GET or POST or all.
Thanks: Mathieu Lirzin for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834389 13f79535-47bb-0310-9956-ffa450edef68