28512 Commits
Author SHA1 Message Date
Florian Motteau c85550e306 Fixed: Wrong Less file path for some theme/locale combinations (OFBIZ-12660) (#521)
For some themes, we rely on toLowerCase method to build a Less file path.
toLowerCase("I") = "ı" for some locales (TR, AZ), which lead to incorrect
file paths and finally broken themes.
2022-08-10 10:35:49 +02:00
dependabot[bot] 783e91f2bd Bump flot in /themes/common-theme/webapp/common-theme/js (#532)
Bumps [flot](https://github.com/flot/flot) from 4.2.2 to 4.2.3.
- [Release notes](https://github.com/flot/flot/releases)
- [Changelog](https://github.com/flot/flot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/flot/flot/compare/v4.2.2...v4.2.3)

---
updated-dependencies:
- dependency-name: flot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-02 19:44:57 +02:00
Deepak Dixit 9b79d38ec5 Updated notification tag maxOccurs, as system allow multiple notification per service 2022-07-29 15:11:52 +05:30
Deepak Dixit 6013c74c22 Improved: Updated mysql jdbc-driver class from com.mysql.jdbc.Driver to com.mysql.cj.jdbc.Driver (OFBIZ-12675) (#529)
MySQL Connector/J 8.0 is highly recommended for use with MySQL Server 8.0 and 5.7. Please upgrade to MySQL Connector/J 8.0.
https://dev.mysql.com/doc/connector-j/8.0/en/
2022-07-29 14:49:59 +05:30
Jacques Le Roux b7b981993c Improved: change uglify-js to real version number
"latest" was preventing updates in trunk demo (merge conflict)
2022-07-28 09:55:38 +02:00
Jacques Le Roux df98889c7b Improved: Data of tenant specific component gets loaded in all instances (OFBIZ-6065)
Improves the information provided about importing and loadAll Gradle task
loadTenant Gradle task should be used when necessary
2022-07-28 09:40:28 +02:00
Jacques Le Roux 9351b641e8 Improved: Data of tenant specific component gets loaded in all instances (OFBIZ-6065)
The tenant relevant Gradle tasks are:

OFBiz Server tasks
------------------
createTenant - Create a new tenant in your environment
loadAdminUserLogin - Create admin user with temporary password equal to ofbiz.
You must provide userLoginId
loadAll - Load default data; meant for OFBiz development, testing, and demo
purposes
loadTenant - Load data using tenantId

loadAll is the new "ant load-data" and should clearly only used for
"OFBiz development, testing, and demo purposes".

Remains the import functionalities. We don't want to get to far with that,
a warning is enough.

Thanks: Pierre Smits for report
2022-07-27 16:20:55 +02:00
dependabot[bot] 7c45738700 Bump uglify-js in /themes/common-theme/webapp/common-theme/js (#527)
Bumps [uglify-js](https://github.com/mishoo/UglifyJS) from 3.16.2 to 3.16.3.
- [Release notes](https://github.com/mishoo/UglifyJS/releases)
- [Commits](https://github.com/mishoo/UglifyJS/compare/v3.16.2...v3.16.3)

---
updated-dependencies:
- dependency-name: uglify-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-26 19:07:22 +02:00
Jacques Le Roux ead5f29146 Improved: Update Groovy to 2.5.18 (OFBIZ-12673)
See https://lists.apache.org/thread/r3q4mh3nnxyl7p0gclzbshcgz574l3sp, notably:

    This release is a maintenance release of the GROOVY_2_5_X branch.
    It is strongly encouraged that all users using prior
    versions on this branch upgrade to this version.

    This release includes 15 bug fixes/improvements as outlined in the changelog:
    https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12318123&version=12351798
2022-07-25 09:16:58 +02:00
Jacques Le Roux 7875045e5a Fixed: Fix OFBiz speficic Javascript securiy issues reported by GH CodeQL (OFBIZ-12366)
Actually I put in a path error then, it's not
value="/common/js/node_modules/node_modules/dompurify/dist/purify.min.js"
but
value="/common/js/node_modules/dompurify/dist/purify.min.js"

This fixes it
2022-07-25 09:16:58 +02:00
georg1312 d82626974a Improved: Strip data to maximum column length for initialRequest and (#526)
initialReferrer (OFBIZ-12672)

Analogous to the existing limitation of the "initialUserAgent" to 250
characters, installation of a limitation of 2000 characters for
initialRequest and initialReferrer, so as not to exit with
"MysqlDataTruncation: Data truncation: Data too long for column
'INITIAL_REFERRER' at row 1" in the case of very long requests.
2022-07-25 09:14:08 +02:00
Michael Brohl 20ccb4dcfd Improved: Make loading of data containing urls configurable
(OFBIZ-12670)

Introduces a SystemProperty security#security.datafile.loadurls.enable
which can be set to true to allow loading of urls in the XML import.
2022-07-21 15:14:58 +02:00
dependabot[bot] c42d580304 Bump dompurify in /themes/common-theme/webapp/common-theme/js (#522)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.3.9 to 2.3.10.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/2.3.9...2.3.10)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-18 17:54:57 +02:00
Nicolas Malin e12c98ac5b Implemented: Define return user message from controller (OFBIZ-12652)
Currently, when you wish return a message to a user after an event request, you need to set it ine the called event.

for a service in java :
  ServiceUtil.returnSuccess("Your service is a success")

for a service in groovy :
  return success("Your service is a success")

for a Java class :
  request.setAttribute("_EVENT_MESSAGE_", "Your service is a success");

If during an integration, you want to use standard service like createProduct, createPartyRelationship, and need a specific message for users, you need to define your own service.

For escape this case and increase the service usability, I propose to implement a new system to override the event return by a definition depending on the buisness context.

For that two improvement :
1. Add new child element to request-map->response on the controller
    With given the exact value:

         <response name="success" type="request" value="json">
             <return-user-message value="Your service is a success"/>
         </response>

    With a flexible expander:

        <response name="success" type="request" value="json">
           <return-user-message value="Your service to change is a success"/>
        </response>

    With a property:

        <response name="success" type="request" value="json">
           <return-user-message ressource="CommonUiLabels" value="CommonSuccessfullyCreated"/>
        </response>

    From a context field:

        <response name="success" type="request" value="json">
           <return-user-message from-field="mySpecificReturnMessage"/>
        </response>

2. From the context directly sent from the form

  <form name="CallEvent" target="MyEvent" .. >
     <field name="_CUSTOM_EVENT_MESSAGE_"> <hidden value="Your service to change is a success"/>
     <field name="_CUSTOM_ERROR_MESSAGE_"> <hidden value="Your service failed"/>

Thanks to Florian Motteau for the implementation help
2022-07-15 15:59:09 +02:00
Nicolas Malin 54c86fd53c Improved: Update documentation for official support of java 11 2022-07-15 15:03:46 +02:00
Nicolas Malin 2c7d552840 Fixed: Calendar in Work Effort does not work (OFBIZ-12665)
Fix a null pointer exception when a menu extend a menu with empty item.
In this case, we use a empty link for the extended menu.

Thanks to Jacques Leroux for the alert
2022-07-15 14:38:16 +02:00
Nicolas Malin 735048f6be Improved: Convert StorageServices.xml mini-lang to groovyDSL (OFBIZ-9350) (OFBIZ-12669)
Convert the service createFacilityLocation from minilang to groovyDSL

Thanks to Tom Gibert for the help
2022-07-15 14:31:18 +02:00
Nicolas Malin d532548e4c Improved: Convert PromoServices.xml mini-lang to groovyDSL (OFBIZ-9350) (OFBIZ-12668)
Convert services createProductPromoCond and updateProductPromoCond from minilang to groovyDSL

Thanks to Tom Gibert for the help
2022-07-15 11:32:29 +02:00
Nicolas Malin c696d232cb Improved: Convert SupplierProductServices.xml mini-lang to groovyDSL (OFBIZ-9350) (OFBIZ-12667)
Convert the service getSupplierProductFeatures from mini-lang to groovyDSL

Thanks to Tom Gibert for the help
2022-07-15 11:32:29 +02:00
dependabot[bot] 80c0676fa6 Bump dompurify in /themes/common-theme/webapp/common-theme/js (#520)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.3.8 to 2.3.9.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/2.3.8...2.3.9)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-12 08:45:03 +02:00
Pierre Smits 38230e4262 Improved: WorkEffort - MainActionMenu (OFBIZ-12557) (#498)
Currently the create buttons for the main objects of the work effort  are located within the find and other widgets/templates of those objects.
In order to improve the usability of OFBiz (and thus the appeal of it for adopters and users) these create buttons/links/etc. should be in a main action menu visible at all times when a user is working within the component.

modified:
WorkEffortMenus.xml - added MainActionMenu for users with CREATE permission in the component
CommonScreens.xml - added MainActionMenu as an 'include-menu' ref in various common decorator screens.
Added MainActionMenu as an 'include-menu' in screen definitions in various other Screen.xml files where appropriate
additional cleaning.
2022-07-10 14:47:35 +02:00
Jacques Le Roux d41d8168c1 Improved: dependabot.yml missed an ASL2 licence header 2022-07-10 10:57:28 +02:00
Nicolas Malin f1c2e8732e Improved: Allow DynamicView use in standard performFind services (OFBIZ-12663)
Extend standard find services (prepareFind, executeFind and performFind) to use a built dynamicView instead of just an entityName.

With this, you can prepare a dedicated dynamicView and call the performFind with on result a database optimisation.

Thanks to Leila Mekika for this proposal and patch
2022-07-08 17:33:30 +02:00
dependabot[bot] 87f86c21ae Bump jquery-validation in /themes/common-theme/webapp/common-theme/js (#519)
Bumps [jquery-validation](https://github.com/jquery-validation/jquery-validation) from 1.19.4 to 1.19.5.
- [Release notes](https://github.com/jquery-validation/jquery-validation/releases)
- [Changelog](https://github.com/jquery-validation/jquery-validation/blob/master/changelog.md)
- [Commits](https://github.com/jquery-validation/jquery-validation/compare/1.19.4...1.19.5)

---
updated-dependencies:
- dependency-name: jquery-validation
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-04 18:10:41 +02:00
dependabot[bot] 5923280441 Bump uglify-js in /themes/common-theme/webapp/common-theme/js (#518)
Bumps [uglify-js](https://github.com/mishoo/UglifyJS) from 3.16.1 to 3.16.2.
- [Release notes](https://github.com/mishoo/UglifyJS/releases)
- [Commits](https://github.com/mishoo/UglifyJS/compare/v3.16.1...v3.16.2)

---
updated-dependencies:
- dependency-name: uglify-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-04 18:09:49 +02:00
Nicolas Malin 8ee85ec390 Improved: Add sequenceNum field on contentAssoc list (OFBIZ-12654)
By the way, clean unnecessary code and change groovy scripting call by the native date translation

Thanks to Ingo Wolfmayr for this issue
2022-07-01 18:49:06 +02:00
Nicolas Malin 576307ac5c Improved: Add missing parameter on xsd for widget-form:on-field-event-update-area (OFBIZ-12586)
On the widget-form.xsd definition, the element on-field-event-update-area haven't possibility to define some parameters.

But on java code, the on-field-event-update-area is read like on-event-update-area.

If you put some parameters on your code, your editor raise a syntax error but OFBiz analyse and execute it well.

            <wf:field name="reload" >
                <wf:submit/>
                <wf:on-field-event-update-area event-type="click"
                                               area-target="ReloadIt">
                    <wf:auto-parameters-service service-name="computeForReload" send-if-empty="false"/>
                </wf:on-field-event-update-area>
            </wf:field>

By the way we can synchronize the on-field-event-update-area xsd on on-event-update-area.
2022-07-01 18:31:41 +02:00
Nicolas Malin e0f61dceb7 Improved: Convert a display-entity to hyperlink if subhyperlink this empty (OFBIZ-12547)
When you define a display-entity you have the possibility to add a sub-hyperlink related to the element displayed.

             <field name="partyIdFrom">
                <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${firstName} ${lastName}">
                    <sub-hyperlink target="viewprofile" description="view">...</sub-hyperlink>
                </display-entity>
            <field>

This display the party name with a link "view" connected.

When you use the name as link without a dedicate sub link, you need to change all the form to resolve the information to display for creating an hyperlink

            <row-actions>
                <entity-one entity-name="PartyNameView" value-field="partyName">
                        <field-map field-name="partyId" from-field="partyIdFrom"/>
                </entity-one>
                <set field="partyNameValue" value=" ${partyName.groupName}${partyName.firstName} ${partyName.lastName}"/>
            </row-actions>
            <field name="partyIdFrom">
                <hyperlink target="viewprofile" description="${partyNameValue}">..</hyperlink>
            </field>

We lost the advantage of the display-entity. With this case, we improve display-entity with the following rule :

If the display-entity has a subhyperlink and the subhyperlink haven't description, the description of the link is the display-entity description.
In the code, if a sub-hyperlink has an empty description, we convert the display entity as a hyperlink
2022-07-01 18:21:49 +02:00
Nicolas Malin 8015dcb02d Improved: Refactoring service resenquence (OFBIZ-12624)
The service "resequence" compute for a content all sequenceNum for linked content assoc.

The code is very old (before apache) so apply a slim refactor and migrate the service name resequence to resequenceContentAssocChildren.

By the way I kept the service definition resequence to move it as deprecated.
2022-07-01 18:04:45 +02:00
Nicolas Malin 7ea371bde3 Fixed: MenuItem doesn't follow correctly extended informations (OFBIZ-12628)
Fix a null pointer exception when the extended menu have an entry without link.

Thanks to Jacques Leroux for the alert
2022-07-01 17:37:14 +02:00
Jacques Le Roux 78ee6f8792 Improved: CustomSafePolicy, also use TagBalancingHtmlStreamEventReceiver (OFBIZ-12653)
Adds <img> and <hr> to CustomSafePolicy, removes obsolete <tt>. <img> allows
only attributes src and alt.

Both <br> and <br /> are correct. For that, this rather uses
TagBalancingHtmlStreamEventReceiver

Thanks: Ingo Wolfmayr
2022-07-01 17:26:18 +02:00
Jacques Le Roux 415b0124fe Improved: Helveticus App-Bar Css Issue - Height change on hover (OFBIZ-12661)
When hovering an app-navigation item, the height of the app bar changes.
Doesn't look good. Attached the correction.

Thanks: Ingo Wolfmayr
2022-06-29 10:52:55 +02:00
Jacques Le Roux 9abd236284 Improved: Update build.gradle to the latest dependencies (OFBIZ-12658)
Reverts asciidoctorj-pdf to 1.5.3

Not sure it will work, at least I have a (another?) problem locally in Win 7
2022-06-29 10:45:34 +02:00
Jacques Le Roux 56fd07118b Improved: Update build.gradle to the latest dependencies (OFBIZ-12658)
Reverts tika-core to 1.28.4 and fop to 2.3

I did not launch the tests, those did not pass:
ecommercetests	testSendOrderConfirmation
widgettests testFopMacroLibrary

Tika is a bit annoying, no security releases after Sept. 30
2022-06-28 19:29:17 +02:00
Jacques Le Roux 5dc416c3c6 Improved: Runs GitHub Gradle build with Java 11
New line just to apply change made in Buildbot config to run w/ Java 11

Thanks to Gavin who noticed I forgot one line in Buildbot config  :/
2022-06-27 20:21:27 +02:00
Jacques Le Roux 1bce4deb5e Improved: Runs GitHub Gradle build with Java 11
New line just to apply change made in Buildbot config to run w/ Java 11

Seems last time Buildbot did not catch up or something is wrong
I double checked Buildbot config is properly set to run w/ Java 11 and change is
committed

Trying again after Gavin confirmed it should be OK on Slack #asfinfra channel
2022-06-27 19:54:35 +02:00
Jacques Le Roux e4777decb4 Improved: Runs GitHub Gradle build with Java 11
New line just to apply change made in Buildbot config to run w/ Java 11

Seems last time Buildbot did not catch up or something is wrong
I double checked Buildbot config is properly set to run w/ Java 11 and change is
committed
2022-06-27 19:15:08 +02:00
Jacques Le Roux a5d949ecde Improved: Runs GitHub Gradle build with Java 11
Trivial change just to apply change made in Buildbot config to run w/ Java 11
2022-06-27 18:39:17 +02:00
Jacques Le Roux 65c766e0c9 Improved: Runs GitHub Gradle build with Java 11 2022-06-27 18:07:28 +02:00
Jacques Le Roux 18d0d75f43 Improved: Update build.gradle to the latest dependencies (OFBIZ-12658)
I noticed that JpegImageParser from Apache Commons Imaging never had a write
option. So I commented it out. I tested uploading, it's OK

org.apache.axiom.om.impl.builder.StAXOMBuilder has been replaced by
org.apache.axiom.om.OMXMLParserWrapper
in SOAPEventHandler.java

The rest of information is in the main build.gradle

I got 2 test errors on Win7. I'll see how it goes on GH and BB.
Maybe it's write.lock issues with Lucene or/and Solr indexes
2022-06-27 15:40:08 +02:00
Jacques Le Roux 80fc052d22 Fixed: [SECURITY] Upgrade Tika to 1.28.4 (OFBIZ-12657)
Mentionned at https://tika.apache.org/
Apache Tika 1.28.4 has been released! This release includes security related
fixes and dependency upgrades
Note: The Apache Tika PMC has set September 30, 2022 as the End Of Life for the
Tika 1.x branch.
2022-06-22 13:52:33 +02:00
Jacques Le Roux 14c58a11c8 Improved: OWASP sanitizer breaks proper rendering of HTML code (OFBIZ-12653)
Allows both <br> and <br /> to pass in UtilCodec::checkStringForHtmlSafe, both
are correct.

Clarifies owasp.properties documentation about how to create own sanitizer
policies
2022-06-21 20:57:37 +02:00
dependabot[bot] a2dbc689fe Bump uglify-js in /themes/common-theme/webapp/common-theme/js (#516)
Bumps [uglify-js](https://github.com/mishoo/UglifyJS) from 3.15.4 to 3.16.1.
- [Release notes](https://github.com/mishoo/UglifyJS/releases)
- [Commits](https://github.com/mishoo/UglifyJS/compare/v3.15.4...v3.16.1)

---
updated-dependencies:
- dependency-name: uglify-js
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-17 17:38:07 +02:00
Jacques Le Roux a88bd3b410 Improved: Update npm dependencies to the latest (OFBIZ-12596)
Dependabot does not support paths with "\" as in Windows
2022-06-17 15:44:20 +02:00
Jacques Le Roux 427bc85666 Improved: Update npm dependencies to the latest (OFBIZ-12596)
This supersedes the usage of npx npm-check-updates by automating npm things with Dependabot in GH
2022-06-17 15:28:15 +02:00
Nicolas Malin 59617b38ac Fixed: Service getNextOrderId failed if a customMethod is present (OFBIZ-12651)
When you generate an order on a party who have a PartyAcctgPreference with a customMethod orderSequence_enforced, the service failed due to the missing parameter partyAcctgPreference.

Like quote and invoice it's preferable to forward the partyAcctgPreference information.
2022-06-17 13:45:03 +02:00
Nicolas Malin 41dd06b72f Fixed: MenuItem doesn't follow correctly extended informations (OFBIZ-12628)
When you use two menus where the second extend the first, menu items and menu links aren't correctly propagated.

The menu items and menu links presents on the second menu already have the first menu on their model.

    ****
    <menu name="FirstMenu" extends="CommonInlineBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
        <menu-item name="MyItem">
            <link target="GoAction"/>
        </menu-item>
    </menu>
    <menu name="SecondMenu" extends="FirstMenu"/>
    ****

The result, if during the rendering some information are generated from the menu, in the previous case, it's always the "FirstMenu" that would be use.

Like when your menu generate a hidden-form, the SecondMenu link the bad form

    ****
    <form method="post" action="GoAction" onsubmit="javascript:submitFormDisableSubmits(this)" name="SecondMenu">...</form>
    <a href="javascript:ajaxSubmitFormUpdateAreas('FirstMenu', 'xxx')">MyItem</a>
    ****

To solve it and don't break the thread safe pattern, I introduce two new constructor for ModelItem and MenuLink for duplicate the ModelMenuItem and MenuLink in memory with the new parent. With this, the SecondMenu iw now completely duplicated on memory and now share any reference with the extended menu.

Thanks to Marco Rodrigues that detect this problem
2022-06-17 11:19:22 +02:00
Nicolas Malin 1042b0fc47 Fixed: Function ProductWorker.shippingApplies failed if chargeShipping is empty (OFBIZ-12649)
No functional change (correction on trunk already did by the OFBIZ-12609)

Condensing the code and remove unused errMsg variable.
2022-06-17 10:19:17 +02:00
Jacques Le Roux 84d30a5abc Improved: Unable to upload a file through ecommerce (OFBIZ-12636)
Allows to check for only CSV files. This is not used OOTB in OFBiz.

Thanks: Sachin for report and confirmation it's OK
2022-06-16 17:43:49 +02:00
Jacques Le Roux 26c209f8b4 Fixed: CategoryContentAssoc form vs. grid (OFBIZ-12641)
ScreenWidget links to form  but should be grid.

Thanks: Ingo Wolfmayr
2022-06-14 17:13:18 +02:00