mysql error message after phoca gallery upgrade

Phoca Gallery - image gallery extension
User avatar
gentoojedi
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 06 Nov 2023, 19:34

mysql error message after phoca gallery upgrade

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: mysql error message after phoca gallery upgrade

Post by Jan »

Hi, which Joomla and which Phoca Gallery version is the one which makes this error?

Jan
If you find Phoca extensions useful, please support the project
User avatar
gentoojedi
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 06 Nov 2023, 19:34

Re: mysql error message after phoca gallery upgrade

Post by gentoojedi »

Joomla 4.4.0
Phoca gallery 4.5.5
php 8.2
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: mysql error message after phoca gallery upgrade

Post 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
If you find Phoca extensions useful, please support the project
User avatar
gentoojedi
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 06 Nov 2023, 19:34

Re: mysql error message after phoca gallery upgrade

Post 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.
User avatar
gentoojedi
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 06 Nov 2023, 19:34

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

Post 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;
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: mysql error message after phoca gallery upgrade

Post by Jan »

Hi, OK, thank you for the info.

Jan
If you find Phoca extensions useful, please support the project
Post Reply