Add a note with the selected date.
1. Incorrect date reading for Polish language.
I suspect a problem with date formatting for time zones.
Labels |
Added:
No Code Attached Yet
|
@brianteeman Below are the debugging errors:
0 Call to a member function format() on bool
Call stack
# Function Location
1 () JROOT/libraries/src/Form/Field/CalendarField.php:352
2 Joomla\CMS\Form\Field\CalendarField->filter() JROOT/libraries/src/Form/Form.php:1047
3 Joomla\CMS\Form\Form->filter() JROOT/libraries/src/Form/Form.php:991
4 Joomla\CMS\Form\Form->process() JROOT/libraries/src/MVC/Model/FormModel.php:213
5 Joomla\CMS\MVC\Model\FormModel->validate() JROOT/libraries/src/MVC/Controller/FormController.php:623
6 Joomla\CMS\MVC\Controller\FormController->save() JROOT/libraries/src/MVC/Controller/BaseController.php:672
7 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
8 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:355
9 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
10 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
11 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:294
12 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61
13 require_once() JROOT/administrator/index.php:32
Thanks for that.
I have confirmed the issue in Polish but not in other languages and it is with all calendar fields not just the one in user notes
As soon as I finish my coffee I will investigate further. I have a pretty good idea of where the problem is so it shouldnt take long
Found the problem - its a language string in the polish language pack that is not correct
DATE_FORMAT_FILTER_DATE = d-m-y
DATE_FORMAT_FILTER_DATETIME = Y-m-d H:i:s
The date format filter date needs to be in the same order as the datetime filter
If you create a language override for DATE_FORMAT_FILTER_DATE and set it to Y-m-d then it will work correctly
@tecpromotion something to inform the polish tt about
@brianteeman @Valdnet Described issue has been fixed in version 4.2.2v3 of Polish language pack with is available on https://downloads.joomla.org/language-packs/translations-joomla4/downloads/joomla4-polish/4-2-2-3 and will be available as an update.
@brianteeman @wojsmol @max123kl After updating to version 4.2.2v3 of the Polish language, the problem still occurs with the date.
confirming the problem is not fixed
I noticed that in the new version 2.2.2v3 for the Polish language, the date format has not been changed according to @brianteeman instructions.
Manual editing of files and code changes:
DATE_FORMAT_FILTER_DATE="d-m-y"
DATE_FORMAT_FILTER_DATETIME="d-m-y H:i:s"
on
DATE_FORMAT_FILTER_DATE="Y-m-d"
DATE_FORMAT_FILTER_DATETIME="Y-m-d H:i:s"
ini
files solves the problem.
@wojsmol is the installation package properly added?
@Valdnet @brianteeman Please post your php version.
in light of something I just saw in the language pack I withdraw from this conversation
in light of something I just saw in the language pack I withdraw from this conversation
@brianteeman What do you mean? You can message me on Mattermost.
@brianteeman You found an easteregg
@Valdnet just update to php:latest
Now that v4 of the language pack has been released I can confirm the issue is now solved and this can be closed
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-01-07 16:47:39 |
Closed_By | ⇒ | Quy |
Works great. Thanks a lot for the fix
Could you please enable debug mode in the global configuration and repeat the steps you took above and then post the stack trace that will be output.