• A new version of Full Calendar is now available.

    See the details here

Fixed Joomla 5.1 - Error on saving modifications to a list or form (non-English backend)

Trembowiecki

Active Member
Hi,

after updating Joomla to 5.1 and merging Fabrik fix, I cannot save modifications to any list or form in the backend. I've tried to create a list - it works. I just cannot save changes to a configuration of any of them. I get this error:

0 Call to a member function format() on bool

Call Stack​

#FunctionLocation
1()JROOT/libraries/src/Form/Field/CalendarField.php:400
2Joomla\CMS\Form\Field\CalendarField->filter()JROOT/libraries/src/Form/Form.php:1047
3Joomla\CMS\Form\Form->filter()JROOT/libraries/src/Form/Form.php:991
4Joomla\CMS\Form\Form->process()JROOT/libraries/src/MVC/Model/FormModel.php:219
5Joomla\CMS\MVC\Model\FormModel->validate()JROOT/administrator/components/com_fabrik/models/list.php:622
6FabrikAdminModelList->validate()JROOT/libraries/src/MVC/Controller/FormController.php:636
7Joomla\CMS\MVC\Controller\FormController->save()JROOT/administrator/components/com_fabrik/controllers/list.php:375
8FabrikAdminControllerList->save()JROOT/libraries/src/MVC/Controller/BaseController.php:730
9Joomla\CMS\MVC\Controller\BaseController->execute()JROOT/administrator/components/com_fabrik/fabrik.php:104
10require_once()JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
11Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
12Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()JROOT/libraries/src/Component/ComponentHelper.php:361
13Joomla\CMS\Component\ComponentHelper::renderComponent()JROOT/libraries/src/Application/AdministratorApplication.php:150
14Joomla\CMS\Application\AdministratorApplication->dispatch()JROOT/libraries/src/Application/AdministratorApplication.php:195
15Joomla\CMS\Application\AdministratorApplication->doExecute()JROOT/libraries/src/Application/CMSApplication.php:306
16Joomla\CMS\Application\CMSApplication->execute()JROOT/administrator/includes/app.php:58
17require_once()JROOT/administrator/index.php:32

Configuring elements and saving changes works with no problems. Right now I have Joomla 5.1, Fabrik 4.0 and PHP 8.2.17.
 
Hmm, I have php 8.1 and don't see an issue.

Can you edit and save your new list?
Do you have e.g. empty dates in the "Publishing" settings?

Edit: I also can't replicate with php8.2

Did you unzip the fix into the correct place?
You must have the file

administrator\components\com_fabrik\classes\51\FormField.php
 
Last edited:
Your post made me think. I've tried a few things that at first might seem ridiculous and... bingo! When I switch backend from Polish to English, it works again. Must be some changes in J5.1, which collide with Polish translation for J5.0. I'm sorry for the confusion, I've head no idea. Troester, you should go straight to heaven for your angel-like patience.
 
:)
It's reporting calendarField. So maybe some Polish Date formats? How do the publising dates look with Polish?
Is it working on J!4 with Polish?
 
Yes, replicatable with Polish in J!5.1 (and not in J!4)
And also replicatable with German:D
It seems it (Fabrik?) is using formatted publish up/down formats and expected is SQL format.
To be investigated...
 
Yesss! I've got this little rascall. In Polish translation there is a line (in joomla.ini):
Code:
DATE_FORMAT_FILTER_DATETIME="d-m-Y H:i:s"
Changed it to:
Code:
DATE_FORMAT_FILTER_DATETIME="Y-m-d H:i:s"
... and it's working again.
 
Ok. I think you can add an override to keep it over the next J! update.

But this was working in J!4 ...
 
Maybe it will work again in J!5.1.1:p
Or it's something Fabrik has to add... (It doesn't seem to be an issue in J! articles although they are showing also the formatted dates)
 
Edit: betteer solution see below
Changing the DATE_FORMAT... won't help. Then it will break e.g. when saving a J! article.

A workaround (if you really need a non-English backend for users manipulating forms/lists/vizs) is to set translateformat ="false" (resp. remove it) for form/list/visualisation.xml
Without translateformat the time part is missing but I think this is the minor issue.


1713381703756.png
 
Last edited:
Thank you, your workaround is obviously working. As for changing DATE_FORMAT, it hasn't affected saving articles in my case, but it's always better to stick to fixes that don't affect the whole J! installation.
 
Ok, your solution is better because it keeps the possibility to set a time.
But you have to override both strings DATE_FORMAT_CALENDAR_DATETIME and DATE_FORMAT_FILTER_DATETIME.

So the workaround is:
Add language overrides for the backend language you want to use (here the German example).

The language strings must be in SQL format ( %Y-%m-%d %H:%M:%S and Y-m-d H:i:s )

1713425218049.png
 
Last edited:
Thank you Troester and Trembowiecki ! I confirm the same issue with the French language in the back-end, which is now solved with an english language back-end for my case...
 
anche io ho lo stesso problema ed ho inserito l'override ma continua a non funzionare
 

Attachments

  • 000.png
    000.png
    72.6 KB · Views: 114
  • 001.png
    001.png
    16.4 KB · Views: 113
  • 003.png
    003.png
    43.6 KB · Views: 110
  • 004.png
    004.png
    52.8 KB · Views: 118
Ok, your solution is better because it keeps the possibility to set a time.
But you have to override both strings DATE_FORMAT_CALENDAR_DATETIME and DATE_FORMAT_FILTER_DATETIME.

So the workaround is:
Add language overrides for the backend language you want to use (here the German example).

The language strings must be in SQL format ( %Y-%m-%d %H:%M:%S and Y-m-d H:i:s )

View attachment 21377

A thousand thanks!
This solution worked for me too.
 
Back
Top