Closed jojo12 closed 5 months ago
Problem is only in backend
In <field name="created" type="calendar" and <field name="modified" type="calendar" into administrator\components\com_jem\models\forms\venue.xml, add these lines:
filterformat="Y-m-d H:i:s"
showtime="true"
like this:
Tell me, if it works.
Well on a site of mine, it did not fix it
For me, this is fixing the issue on one site, on the other not ??? EDIT: Uups, I tried on the first site with event. There was never a problem! sorry. php 8.2.16 J!5.1 JEM 4.2.1dev and your proposal
THE PROBLEM IS NOT SOLVED ON BOTH SITES!!!
Tell me any data of site. Do you apply the last commit of JEM 4.2.1dev? (refresh)
Ups, but does it solve the problem or not? I don't have clear your situations (yes, no...) I had simulated the error, and this solves it. I'm on JL 5.1, PHP 8.2 and JEM 4.2.1 dev
I do not have JEM 4.2.1 installed, I just edited venue.xml
php 8.2.16 J!5.1 JEM 4.2.1dev and your proposal [sorry I was on the dinner] it's not yet fixed
Send a capture with php error, is the same error? In the venus view when save.
Meanwhile I changed the language to english, then there is no problem: Can it be this is once again a language localisation problem? EDIT: I tested on my second site too, with english, no problems, with german: the problem persists! EDIT 2: I continued testing: changing language, changes result: english ok, german error
@jobrusche: which language are you using?
This night, I will try to simulate the erro in other languages....could be.
now stack is:
-- | -- | -- 1 | () | JROOT/libraries/src/Form/Field/CalendarField.php:400 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:219 5 | Joomla\CMS\MVC\Model\FormModel->validate() | JROOT/libraries/src/MVC/Controller/FormController.php:636 6 | Joomla\CMS\MVC\Controller\FormController->save() | JROOT/libraries/src/MVC/Controller/BaseController.php:730 7 | Joomla\CMS\MVC\Controller\BaseController->execute() | JROOT/administrator/components/com_jem/jem.php:54 8 | require_once() | JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71 9 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher{closure}() | JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73 10 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() | JROOT/libraries/src/Component/ComponentHelper.php:361 11 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT/libraries/src/Application/AdministratorApplication.php:150 12 | Joomla\CMS\Application\AdministratorApplication->dispatch() | JROOT/libraries/src/Application/AdministratorApplication.php:195 13 | Joomla\CMS\Application\AdministratorApplication->doExecute() | JROOT/libraries/src/Application/CMSApplication.php:306 14 | Joomla\CMS\Application\CMSApplication->execute() | JROOT/administrator/includes/app.php:58 15 | require_once() | JROOT/administrator/index.php:32
I'm using nl-BE (Flemish) I switched to en-GB(admin) and now the new location can be saved without error.
Yes, with JL5.1 in spanish, I have the error. Let's me debug it.
I try to explain the issue: When create or edit a venue item, on the right side there is a created field. This field is created datetime of venue item. This datetime is created in english format. In the venue.xml have the translateformat attribute for this calendar field. When the translateformat is true, the created field in the view is shown in the language of Joomla backend, only show because the value of this field is english format.
The issue is when you want to save the venue because Joomla compares the value (EN) with your datetime format of language of backend, and it isn't compatible and have the error result.
This issue is opened in Joomla: https://issues.joomla.org/tracker/joomla-cms/41224 https://github.com/joomla/joomla-cms/issues/41444
For the moment, the best solution is to change "translateformat=false", so, the created field will be shown in english format, and you can save the data without error.
Tell me if it works in other languages, for me with the backend in spanish, it works too.
When you confirm, I will upload a commit with this workaround --> translateformat ="false" in venue.xml, so, it will be included in the next version JEM 4.2.1
Before starting to test, I wonder: The dates for created and modified are e.g. in events too, BUT there is no problem. The same, when I edit venue in frontend: no problem! (No problem too in categories, groups...)
I made the indicated changes and tested in backend and frontend in german and english (always with clean cache) it works as you describe (without a german dateformat)
In frontend, JEM doesn't show the created datetime and this field is created when the event and venues are saved. The category and group don't have XML form file. I don't understand why the JEM backend has to show the created datetime on the right side for a new item (venues), As a solution, it could be showed in text mode (these fields are read-only).
@joo12 can it be closed or no this issue? I think that it's fixed.
0 Call to a member function format() on bool
| Function | Location
-- | -- | -- 1 | () | JROOT/libraries/src/Form/Field/CalendarField.php:400 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:219 5 | Joomla\CMS\MVC\Model\FormModel->validate() | JROOT/libraries/src/MVC/Controller/FormController.php:636 6 | Joomla\CMS\MVC\Controller\FormController->save() | JROOT/libraries/src/MVC/Controller/BaseController.php:730 7 | Joomla\CMS\MVC\Controller\BaseController->execute() | JROOT/administrator/components/com_jem/jem.php:54 8 | require_once() | JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71 9 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher{closure}() | JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73 10 | Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() | JROOT/libraries/src/Component/ComponentHelper.php:361 11 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT/libraries/src/Application/AdministratorApplication.php:150 12 | Joomla\CMS\Application\AdministratorApplication->dispatch() | JROOT/libraries/src/Application/AdministratorApplication.php:195 13 | Joomla\CMS\Application\AdministratorApplication->doExecute() | JROOT/libraries/src/Application/CMSApplication.php:306 14 | Joomla\CMS\Application\CMSApplication->execute() | JROOT/administrator/includes/app.php:58 15 | require_once() | JROOT/administrator/index.php:32