Can't save Category edits

Phoca Gallery - image gallery extension
naughtygrandma
Phoca Member
Phoca Member
Posts: 27
Joined: 11 Feb 2024, 13:41

Can't save Category edits

Post by naughtygrandma »

Hi,

I have the latest version of Phoca Gallery 5 and Joomla 5.
When I edit a Category and press the Save button I get an error and nothing is saved. The following email error message is sent to me. I have edited out private information like xxxxxx

Please can you help me?

Thank you,

Andy
-------------
Error Code 0
Error Type Error
Message Call to a member function format() on bool
File /home/xxxxxxx/public_html/libraries/src/Form/Field/CalendarField.php
Line 400
Protocol https
Request /administrator/index.php?option=com_phocagallery&view=phocagalleryc&layout=edit&id=110
Referrer https://xxxxxxxxx.co.uk/administrator/i ... dit&id=110
Method POST

Type Function Class Line File
D filter Joomla\CMS\Form\Field\CalendarField 1047 /libraries/src/Form/Form.php
D filter Joomla\CMS\Form\Form 991 /libraries/src/Form/Form.php
D process Joomla\CMS\Form\Form 219 /libraries/src/MVC/Model/FormModel.php
D validate Joomla\CMS\MVC\Model\FormModel 238 /administrator/components/com_phocagallery/controllers/phocagalleryc.php
D save PhocaGalleryCpControllerPhocaGalleryc 730 /libraries/src/MVC/Controller/BaseController.php
D execute Joomla\CMS\MVC\Controller\BaseController 50 /administrator/components/com_phocagallery/phocagallery.php
N/A require_once N/A 71 /libraries/src/Dispatcher/LegacyComponentDispatcher.php
S Joomla\CMS\Dispatcher\{closure} Joomla\CMS\Dispatcher\LegacyComponentDispatcher 73 /libraries/src/Dispatcher/LegacyComponentDispatcher.php
D dispatch Joomla\CMS\Dispatcher\LegacyComponentDispatcher 361 /libraries/src/Component/ComponentHelper.php
S renderComponent Joomla\CMS\Component\ComponentHelper 150 /libraries/src/Application/AdministratorApplication.php
D dispatch Joomla\CMS\Application\AdministratorApplication 195 /libraries/src/Application/AdministratorApplication.php
D doExecute Joomla\CMS\Application\AdministratorApplication 306 /libraries/src/Application/CMSApplication.php
D execute Joomla\CMS\Application\CMSApplication 58 /administrator/includes/app.php
N/A require_once N/A 32 /administrator/index.php
-----------

Tags:
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9435
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Can't save Category edits

Post by Benno »

Hi,
this will be fixed with J5.1.1
temporary fix, see: viewtopic.php?t=65575

Kind regards,
Benno
naughtygrandma
Phoca Member
Phoca Member
Posts: 27
Joined: 11 Feb 2024, 13:41

Re: Can't save Category edits

Post by naughtygrandma »

Thank you for the information Benno,

I commented out this code but it didn't work for me.
if ($this->layoutData) {
return $this->layoutData;
}

so I will wait for the the next Joomla update.
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9435
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Can't save Category edits

Post by Benno »

Hi,
How did you comment out the code? So far it has always worked like this:
/libraries/src/Form/FormField.php
Line: 1353

Code: Select all

/*if ($this->layoutData) {
return $this->layoutData;
}*/
Kind regards,
Benno
naughtygrandma
Phoca Member
Phoca Member
Posts: 27
Joined: 11 Feb 2024, 13:41

Re: Can't save Category edits

Post by naughtygrandma »

Dear Benno

I was commenting out like this
/** {
* if ($this->layoutData) {
* return $this->layoutData;
* }
*/
but now I have done it exactly as you said and it is perfect now.

Thank you so much for all your help. I am learning fast.

Andy
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9435
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Can't save Category edits

Post by Benno »

You're welcome!

Kind regards,
Benno
Post Reply