Magento2: Admin Order Reports throw exception in en_GB locale

Created on 19 Dec 2016  路  8Comments  路  Source: magento/magento2

Environment

  1. PHP 5.6.16
  2. MySQL 5.6.21-log
  3. Magento 2.1.3
  4. Apache 2.4.17

Steps to reproduce

  1. In System > All Users > User > [You], set the interface locale to English (United Kingdom):
    blog-3
  2. In Reports > Sales > Orders, execute a query involving days above 12 e.g. 31/11//2016, but not 10/11/2016: hama-1
  3. Click "Show Report"

Expected result

  1. Magento generates Order Report between the dates specified

Actual result

  1. (Exception): Invalid input date format '31/12/2015': hama-2

General date/locale issues

  • Although JS datepickers follow the locale set in "System > Users", PHP doesn't which causes these validation errors.
  • #6323, a similar issue, has already been resolved by @slavvka.
Customer Fixed in 2.2.x Fixed in 2.3.x Format is not valid Ready for Work bug report

All 8 comments

@JacobDrummond thank you for your report.
This issue was fixed in developer branch but was not fixed in 2.1 yet.
We have internal ticket for this version: MAGETWO-57839

@veloraven, thanks for your feedback.

When will these develop fixes be included in a release?

In general, what is your develop-to-release workflow?

@JacobDrummond It can happen because of locale: try M/D/Y format instead and check if it works.

@webdevlabo, yes that's the known fix :)

The whole point of this bug report is that Magento should be implementing locale consistently across JS and PHP.

@veloraven this has been reported a few times since October, do you have an ETA on when it might be fixed? or is there a way we can see the code that needs to be modified from the developers branch?

We are based in UK with latest Magento 2.1.3, is there an update on when the fix will be released?

@veloraven I performed the tests and the error persists in versions 2.1.5 and 2.1.6
I opened an issue #9432

@JacobDrummond, thank you for your report.
The fix for this issue is already available in the develop and 2.2-develop branches. See commits with MAGETWO-57835 in the title.

Was this page helpful?
0 / 5 - 0 ratings