Commit Graph
27737 Commits
Author SHA1 Message Date
Deepak Dixit 4f25633992 Update India Geo information according to ISO notifications 2019-11-22
(OFBIZ-11399)

Change of subdivision category from state to Union territory for IN-JK; Addition of Union territory IN-LA;
2020-02-22 12:52:45 +05:30
Suraj Khurana 31ff921db3 Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-framework into trunk 2020-02-22 12:42:15 +05:30
Suraj Khurana 24fb560ecf Fixed: UserLoginPasswordHistory is not maintaining password as present in UserLogin.
(OFBIZ-10802)
Thanks Rohit Koushal for the patch. Thanks Jacques Le Roux and Gil Portenseigne for the review.
2020-02-22 12:41:36 +05:30
Jacques Le Roux 549543ace5 Fixed: replaceFirst sensible to variable pattern
(OFBIZ-11396)

When using variable pattern with replaceFirst you may cross issues if the
pattern contains specific tokens. For instance on Windows with the path
"C:\projectsASF\Git\ofbiz-framework/" you have inside the token "\p" which has
a special meaning.
2020-02-22 07:32:15 +01:00
akash 6013472b19 Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-framework into trunk 2020-02-22 11:28:56 +05:30
akash 5d011d3226 Improvement: Quantity and Add to Cart button showing twice on Compare Products page
(OFBIZ-10665)

Thanks, Ritesh Kumar and Dikpal Kanungo for your contribution.
2020-02-22 11:26:29 +05:30
Pawan Verma f25c7d33dc Improved: Enhance the Programmable Export feature for EntityQuery support
(OFBIZ-11158)

EntityQuery usage to perform data fetching is increasing, we should also add support for EntityQuery in ProgramExport feature.

Thanks: Devanshu Vyas for report and patch and Suraj Khurana, Nicolas Malin for the review.
2020-02-22 11:22:34 +05:30
Michael Brohl e0a26fce43 Improved: Convert ProductServices.xml mini lang to groovy
(OFBIZ-10231)

Thanks Dennis Balkir for reporting and Sebastian Berg for the implementation.
2020-02-21 17:50:58 +01:00
Pierre Smits 974b85f4ec Improved: Cleanup HumanRes labels
(OFBIZ-9367)

Removing unused HumanRes labels
2020-02-21 11:26:01 +01:00
Pierre Smits c71a7ae06d Improved: UI labels
(OFBIZ-9352)

Cleaning up unused labels
2020-02-21 11:20:47 +01:00
Nicolas Malin 0da10ea897 Fixed: FindGeneric failed to generate forms
(OFBIZ-11335)

The commit 1941a05a34 introduce the visualTheme
to generate a form with FactoryForm and forms present on FindGeneric has been forget

Thanks to Sebastian Berg for raise this issue
2020-02-20 19:34:01 +01:00
Nicolas Malin 296417a7bd Fixed: Correct check style issue on ModelTheme 2020-02-20 14:50:19 +01:00
Nicolas Malin 38f972a0d0 Improved: Add CommonForms as template pattern configured by theme
(OFBIZ-11335)

Currently on OFBiz we implemented a process to define some different
screen and menu that can be implemented by the theming.
But for the form we have nothing. All style are hard coded on each

    <grid name="ListEntities" ...
      odd-row-style="alternate-row" default-table-style="basic-table hover-bar">

I extend the theming implementation principle to forms element with adding :
 * a new xsd element common-forms (like common-screens)
 * some default form templates to extend :
   * grid CommonSimpleGrid
   * grid CommonBasicGrid
   * form CommonSimpleList
   * form CommonBasicList
   * form CommonInLineEditList
   * form CommonBasicSingle

We can use its like :

    <form name="LayoutDemoList" extends="CommonBasicList"
          extends-resource="component://common/widget/CommonForms.xml"

The main difficulty raise to this task was propage the visualTheme during
the ModelForm intanciation, because we need to load wiget style
(and some other information wanted on the template) on model load in memory.
This is cover by commit 1941a05a34.

Forms present on the screen https://localhost:8443/webtools/control/WebtoolsLayoutDemo
are now extend through with theme.

Finally with this we can extend style form (pagination, header, line and so on ...)
directly by your theme without change the framework.
2020-02-20 14:49:11 +01:00
Nicolas Malin 1941a05a34 Improved: Manage VisualTheme in ModelForm
(OFBIZ-11335)

Related to issue OFBIZ-11335, extends form's factories and form's models
to support a visualTheme during the model creation.

This extend help centralize style information used by forms on a theme.
For performance reason when the model is loaded in memory, all theme information
need to be present to set immutable as possible to put it in cache
(implies why the key cache contains now the visualThemeId).
2020-02-20 14:34:28 +01:00
Nicolas Malin d8641bce8c Fixed: Correct FoFormMacro to support form list with non separate fields
(OFBIZ-11335)

Related to issue OFBIZ-11335 when a form list haven't the attribute separate-column to true,
the screen engine failed to rendering it through screen-fop due to a block present on table-row without table-cell.

We have in log some line like :
    ScreenFopViewHandler |E| Unable to transform FO file: org.apache.fop.apps.FOPException: javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: null:150:2: "fo:block" is not a valid child of "fo:table-row"!

Simple fix is to open and close a table-cell when renderFormatHeaderRowFormCell[Open/Close] and renderFormatItemRowFormCell[Open/Close] are called.
2020-02-20 14:13:57 +01:00
Jacques Le Roux 01bd096dc6 Fixed: The "stream" request-map in ecommerce and commonext controllers
requires authentication
(OFBIZ-11349)

Thanks: Michael for reporting a possible issue when only commenting the "stream"
request-map in commonext controller. And Jacopo to suggest to require
authentication (after suggesting to comment out)

It should be also noted that when the CSRF defense implementation will be in
place, all XSS vulnerabilities w/o authentication will not longer be possible.
Because then all requests shall contains a CSRF token.
2020-02-19 13:48:23 +01:00
Jacques Le Roux 72d1995d39 Fixed: Temporarily comment out the "stream" request-map in commonext controller
for security reason
(OFBIZ-11353)

A vulnerability has been reported to the OFBiz security team. To be able to
release the 17.12.01 version with this vulnerability fixed we need to require
(maybe only temporarily) the "stream" request-map in commonext controller
to need authentication.

We will later check that this has no impact and if necessary remove the
mandatory authentication, see OFBIZ-11349
2020-02-19 09:34:50 +01:00
Michael Brohl c332322017 Fixed: CMS add content not working.
(OFBIZ-10833)

This fixes the missing content association and wrong update of the
parent content reported by Ingo Wolfmayr. Thanks Sebastian Berg for
providing the patch.
2020-02-18 21:28:14 +01:00
Michael Brohl 42a6171580 Fixed: Alternate KeyWord Thesaurus functionality does not work properly.
(OFBIZ-11291)

Thanks Pawan Verma for reporting and Wiebke Pätzold for providing the
patch.
2020-02-18 10:08:36 +01:00
Pierre Smits 58b0da26f5 Improved: Remove unused labels from ProductUiLabels.xml
(OFBIZ-10551)

Removal of unused labels
2020-02-17 15:09:37 +01:00
Jacques Le Roux 969f48b7c9 Fixed: Add 'controlPath' attribute to 'ofbizUrl' freemarker macro
(OFBIZ-11317)

In some place, like at least themes/tomahawk/template/AppBarClose.ftl the CSRF
token is not generated. Because in those places OfbizUrlTransform is used.

An immediate solution is to add the CSRF token generation in OfbizUrlTransform
class.

A definitive solution is to complete OFBIZ-11229
"Merge UrlRegexpTransform and OfbizUrlTransform classes"
2020-02-15 13:24:09 +01:00
Jacques Le Roux 9db0d8f2fb Fixed: Temporarily comment out the "stream" request-map in ecommerce controller
for security reason
(OFBIZ-11353)

A vulnerability has been reported to the OFBiz security team. To be able to
release the 17.12.01 version with this vulnerability fixed we need to
temporarily comment out the "stream" request-map in commonext controller.
We will later fix the specific issue to put back the functionalities allowed by
the "stream" request-map in this controller, see OFBIZ-11349
2020-02-14 10:19:03 +01:00
Gil Portenseigne 8653b6374e Improved: Error in user impersonation with sub permission
(OFBIZ-11342)

Improved javadoc
Set 'checkMultiLevelAdminPermissionValidity' visibility to default
Add another test verifying that hierarchy in permission is respected

Thanks Mathieu for your review
2020-02-13 15:36:59 +01:00
Pierre Smits e1e1a4813d Implemented: Add 'controlPath' attribute
(OFBIZ-11317)

added: Missed aspected in header.ftl in bluelight theme
(cherry picked from commit ae98498701)
2020-02-12 12:09:34 +01:00
Gil Portenseigne c73b97eb29 Fixed: Error in user impersonation with sub permission
(OFBIZ-11342)

Add unit tests for permission control feature.
Add new method to manage multilevel permission control.
This allowing an user with PARTYMGR_ADMIN permission to impersonate
another user with PARTYMGR_PCM_CREATE permission.
2020-02-12 09:53:45 +01:00
Michael Brohl 3788f6766a Revert "Multi Part Input Parameters not Available in Groovy Event (OFBIZ-5048)"
This reverts commit 8af3e9ce6b.
2020-02-11 21:49:15 +01:00
Michael Brohl abf11bd3e6 Revert "Improved: Remove unused services from party/services_view.xml and PartyServices.java/.xml. (OFBIZ-9988)"
This reverts commit 00a5d3413a.
2020-02-09 15:42:46 +01:00
Cy 12af361c38 Update README
Rectified broken link for Known Issues

Current link points to a Page Not Found in Confluence

(cherry picked from commit b35cd8a153)
2020-02-08 13:59:35 +01:00
Michael Brohl fc21237fee Fixed: Form widget field with input-method="time-dropdown" unable to
understand the default time.
(OFBIZ-11150)

Thanks Wiebke Pätzold for reporting and providing the patch.
2020-02-07 16:36:10 +01:00
Jacques Le Roux 9ce3118cc2 Fixed: Unable to continue to Step 3 in One Page Checkout
(OFBIZ-11318)

The following error is returned when trying to continue to Step3 when checking
out using One Page Checkout.

Could not create new purpose, a purpose with that type already exists.:
[GenericEntity:PartyContactWithPurpose][contactFromDate,2020-01-05 19:48:18.29
(java.sql.Timestamp)][contactMechId,10020(java.lang.String)]
[contactMechPurposeTypeId,SHIPPING_LOCATION(java.lang.String)]
[partyId,admin(java.lang.String)][purposeFromDate,2020-01-05 19:48:18.332
(java.sql.Timestamp)

It does not happen with DemoCustomer but at least with admin user

It was caused by OFBIZ-10588. I checked for similar issues and found that, in
unlike in createUpdateBillingAddress, in createUpdateShippingAddress and
createUpdateCreditCard partyId was used without a prior setting from
parameters.partyId

Thanks: James Young for proposing a solution. I rather fixed otherwise this and
another similar case in createUpdateCreditCard
2020-02-07 14:45:11 +01:00
akash 701ec7f3ea Fixed: Unnecessary ship groups in orders.
(OFBIZ-10489)

Thanks, Oleg Andreyev and Mohammad Kathawala for your contribution.
2020-02-07 18:41:10 +05:30
Nicolas Malin 47e689b360 Fixed: Crashed Scheduled jobs are not getting rescheduled with temporal expression
(OFBIZ-11340)

When a OFBiz server are stopped or crashed with job on queued state,
at the start, they are restarted but without information on tempExprId and recurrenceInfoId

This causes a break for recurrence jobs to their planning

Thanks to Mohammed Rehan Khan for this issue and Scott Gray for the review.
2020-02-06 17:02:12 +01:00
Nicolas Malin 30a389c8d9 Fixed: correct check style issue on ComponentContainerTest.java
No functionnal change
2020-02-06 13:29:26 +01:00
Jacques Le Roux 350c71f4df Fixed: setUserTimeZone should ran only once based on error
(OFBIZ-11329)

This will be notably useful when committing CSRF solution as explained in
OFBIZ-11306:

SetTimeZoneFromBrowser when starting gives a  RequestHandlerException:
Invalid or missing CSRF token for AJAX call to path '/SetTimeZoneFromBrowser'.
Also not only when starting.

Thanks: James Yong for review
2020-02-05 09:30:55 +01:00
Jacques Le Roux d5f19e3560 Fixed: impersonateLogin
(OFBIZ-5409)

I reopended this old issue because, while working on  OFBIZ-11329, I found that
userLogin and impersonateLogin should be removed from
jsonResponseFromRequestAttributes

Thanks: James Yong for pointing that out
2020-02-04 15:35:40 +01:00
Jacques Le Roux fec0e19de0 Improved: no functional change
Fixed Javadoc creation issue reported at INFRA-19807

Thanks: Chris Lambertus
2020-02-04 09:45:55 +01:00
Michael Brohl db92854bce Improved: Translate invoice type dropdown
(OFBIZ-10191)

Thanks Ingo Wolfmayr for reporting and providing the patch.
2020-02-01 19:07:58 +01:00
Michael Brohl e4335b66c2 Improvement: German translation improvements in HumanResUiLabels
(OFBIZ-11134)

Thanks Ulrich Heidfeld for reporting and providing the patch.
2020-02-01 14:09:14 +01:00
Michael Brohl 8af3e9ce6b Multi Part Input Parameters not Available in Groovy Event
(OFBIZ-5048)

This change provides easier access to the FileItem by not wrapping it
into a buffer.
2020-01-31 15:50:47 +01:00
Michael Brohl 765fdbbbd8 Extend UtilHttp.urlEncodeArgs API with preserveEmpty-parameter
(OFBIZ-10198)

This patch extends the current UtilHttp.urlEncodeArgs() method with an
additional input parameter: boolean preserveEmpty.

It allows to get a query string with empty parameters, useful if the
receiver expects mandatory parameters or wants to explicit
override/clear existing values with an empty one.

Thanks Martin Becker for reporting and providing the patch.
2020-01-30 21:33:41 +01:00
Michael Brohl 0ddef5dad7 Improved: Remove unnecessary header-row classes in Upcoming.ftl
(OFBIZ-11305)

Thanks Dennis Balkir for reporting an providing the patch.
2020-01-30 21:19:03 +01:00
Michael Brohl 0a6d5c54e4 Improved: Add Asciidoc template for plugin creation task
(OFBIZ-10322)

Create a README.adoc stub and help file stub in the new format under
framework/resources/templates and use in the plugin creation task.

Thanks Ulrich Heidfeld for providing the patch.
2020-01-30 20:34:40 +01:00
Daniel Watford 52e21a3d2e Improved: Use FlexibleStringExpander for field parameter names.
(OFBIZ-11330)

Allows generation of unique names when repeating rendering of a form on a screen.
Added test cases to ensure parameter names can be built using FlexibleStringExpander.
2020-01-29 14:05:37 +01:00
Nicolas Malin 91fa4a958c Fixed: Clean unecessary code and convert to groovy syntax
No functional change

The code present on ViewGeneric.groovy has been migrated from bsh script
without deep rewrite.

I removed all unecessary or redund code to lighten the reading
2020-01-29 10:50:30 +01:00
Nicolas Malin 1ee1ec76d6 Fixed: Change 'restMethod' by '_method' in request parameters
(OFBIZ-11007)

Some issue has been introduce on the previous commit 6e1c7b5 [1], corrected by this one :
  * the view link on ListGeneric failed
  * the paginate on ListGeneric failed

I also simplify the url writing with delegate the entity path generation and translation
to two function on EntityUtil : entityToPath and getPkValuesMapFromPath

thanks to Pawan Verma to spot the pagination problem

[1] https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=6e1c7b5
2020-01-29 10:50:30 +01:00
Nicolas Malin 11cf350302 Improved: Change 'restMethod' by '_method' in request parameters
(OFBIZ-11332)

When we analyse a request method, we currently check the parameter "restMethod".
Mathieu Lirzin propose [1] to use "_method" instead to use a parameter name more generic

I create a new function UtilHttp.getRequestMethod() to centralize the request method resolution.

[1] https://issues.apache.org/jira/browse/OFBIZ-11007?focusedCommentId=17012712&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17012712
2020-01-29 10:50:29 +01:00
Nicolas Malin fac12a4e6f Fixed: No functional change, correct checkstyle issues on GenericWebEvent.java 2020-01-29 10:50:29 +01:00
Pawan Verma 8902637669 Revert "Fixed: Potensial bug under CommunicationEventServices#updateCommEventAfterEmail for CommunicationEvent.subject field"
(OFBIZ-10879)

This reverts commit 832076ce91.
2020-01-29 12:57:06 +05:30
Jacques Le Roux c672c3a304 Fixed: Cannot run ComponentContainerTest on windows
(OFBIZ-11331)

Running ComponentContainerTest on windows fails due to parsing of paths of the
form '/c:/dev/....'
org.apache.ofbiz.base.container.ComponentContainerTest >
testCheckDependencyForComponent FAILED
java.nio.file.InvalidPathException at ComponentContainerTest.java:44

Line 44:
private Path ofbizHome = Paths.get(ComponentContainerTest.class.getResource
("testsdata").getFile()).toAbsolutePath().normalize();

PR created: #8

Thanks: Daniel WatfordNina Simone - My Baby Just Cares For Me.mp3
2020-01-28 18:36:06 +01:00
Jacques Le Roux 6d194cf8c3 OFBIZ-11331: Allow ComponentContainerTest to run on windows (#8)
* Get Path from URI than a string representation of a file path when building Path to test resources.

* Removed unused test imports.
2020-01-28 15:58:07 +01:00