Page 1 of 1

mysql error message after phoca gallery upgrade

Posted: 06 Nov 2023, 19:41
by gentoojedi
Hy everybody!

I use phoca gallery on one of my websites. I installed it on Joomla 1.5 and upgraded it continuously.
J1.5 -> 2.5 -> 3.x -> 4.x
It worked perfect until joomla 3.10.
After the Joomla4 upgrade, an error was occurred when i want to make new category:

ERROR: Field 'params' doesn't have a default value

I solved this in phpmyadmin.

ALTER TABLE `j25_phocagallery` CHANGE `params` `params` text;
ALTER TABLE `j25_phocagallery_categories` CHANGE `params` `params` text;

Now i can adding new category, but an other error was occurred.

When i want to multiple add images and i push save and close, the error message below was displayed:

Call to undefined method Joomla\Database\Mysqli\MysqliDriver::getErrorMsg()

This is the log:

CRITICAL 88.132.218.124 error Uncaught Throwable of type Error thrown with message "Call to undefined method Joomla\Database\Mysqli\MysqliDriver::getErrorMsg()". Stack trace: #0 [ROOT]/libraries/src/MVC/Controller/FormController.php(676): PhocaGalleryCpModelPhocaGalleryM->save(Array)
#1 [ROOT]/libraries/src/MVC/Controller/BaseController.php(693): Joomla\CMS\MVC\Controller\FormController->save()
#2 [ROOT]/administrator/components/com_phocagallery/phocagallery.php(50): Joomla\CMS\MVC\Controller\BaseController->execute('save')
#3 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('/web/leose90/le...')
#4 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}('/web/leose90/le...')
#5 [ROOT]/libraries/src/Component/ComponentHelper.php(361): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#6 [ROOT]/libraries/src/Application/AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent('com_phocagaller...')
#7 [ROOT]/libraries/src/Application/AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch()
#8 [ROOT]/libraries/src/Application/CMSApplication.php(293): Joomla\CMS\Application\AdministratorApplication->doExecute()
#9 [ROOT]/administrator/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute()
#10 [ROOT]/administrator/index.php(32): require_once('/web/leose90/le...')

I don't have any idea.

Re: mysql error message after phoca gallery upgrade

Posted: 07 Nov 2023, 01:02
by Jan
Hi, which Joomla and which Phoca Gallery version is the one which makes this error?

Jan

Re: mysql error message after phoca gallery upgrade

Posted: 07 Nov 2023, 18:39
by gentoojedi
Joomla 4.4.0
Phoca gallery 4.5.5
php 8.2

Re: mysql error message after phoca gallery upgrade

Posted: 08 Nov 2023, 00:15
by Jan
Hi, try to download this file:
https://www.phoca.cz/forumfiles/phocagallerym.zip

and unzip it to folder:

administrator/components/com_phocagallery/models/

(phocagallerym.php will be overwritten).

This should fix the displaying of error message (but it does not solve the problem, it only displays correct error message, so it can be fixed then - it looks like this will be also database problem).

Jan

Re: mysql error message after phoca gallery upgrade

Posted: 08 Nov 2023, 11:54
by gentoojedi
Thanks Jan.

After uploading the patch, when i push save and close in multiple add images, now this is the error message:
Field 'description' doesn't have a default value.

Re: [SOLVED] mysql error message after phoca gallery upgrade

Posted: 09 Nov 2023, 21:54
by gentoojedi
I have Solved the problem

the upgrade script did not convert the required tables to text values during the upgrade process
I did it manually like this:


ALTER TABLE `j25_phocagallery` CHANGE `params` `params` text;
ALTER TABLE `j25_phocagallery_categories` CHANGE `params` `params` text;
ALTER TABLE `j25_phocagallery` CHANGE `description` `description` text;
ALTER TABLE `j25_phocagallery_categories` CHANGE `description` `description` text;
ALTER TABLE `j25_phocagallery` CHANGE `extlink1` `extlink1` text;
ALTER TABLE `j25_phocagallery` CHANGE `extlink2` `extlink2` text;

Re: mysql error message after phoca gallery upgrade

Posted: 10 Nov 2023, 20:22
by Jan
Hi, OK, thank you for the info.

Jan