Page 1 of 2

1054 Error

Posted: 15 Aug 2022, 23:50
by neigerdesign1
On my site when a logged-in user clicks on the shopping cart they are met with a 1054 Error that says: "Unknown column 'c.params_shipping' in 'field list'" I am unsure how to fix this error and have been trying for some time now. Any insight on how to fix this would be much appreciated.

Thank you,

Grady

Re: 1054 Error

Posted: 20 Aug 2022, 23:21
by Jan
Hi, which version of Phoca Cart do you use? This seems like database was not correctly updated while update. The database columns should be added in version 3.5.5:


If they are not included in database, the should be added manually:

administrator/components/com_phocacart/update/sql/mysql/3.5.5.sql

e.g. with phpMyAdmin (change the prefix #__ to your database prefix)

Jan

Re: 1054 Error

Posted: 29 Sep 2022, 22:21
by adroussel
Hello
I have the same issue and playing manualy the update file in phpmyadmin did not help
as the column was already there.

The issue arose when upgrading to Joomla 4 and the installing phocacart 4.0.5
Every page shows that error message.

Thank you for your help

Re: 1054 Error

Posted: 29 Sep 2022, 22:35
by adroussel
Issue seems to be from
#__phocacart_cart_multiple missing that column
Do you think there are other schema differnces between both versions?

Re: 1054 Error

Posted: 29 Sep 2022, 22:44
by Benno
@ adroussel
The issue arose when upgrading to Joomla 4 and the installing phocacart 4.0.5
Did you follow this migration guide?
https://www.phoca.cz/documents/50-jooml ... o-joomla-4

Kind regards,
Benno

Re: 1054 Error

Posted: 24 Jul 2023, 22:44
by Nidzo
Hi. I'm getting the same error on one site when I enable user login. Every page where is enabled Phoca Cart cart module throws this error and checkout page too.

Guest checkout works fine.

Joomla 4.3.3
Phoca Cart 4.0.7. (tried with latest beta realeases from GitHub too)

This is error:

ERROR 1054 - Unknown column 'c.params_shipping' in 'field list' in C:\wamp64\www\cakaran\libraries\vendor\joomla\database\src\Mysqli\MysqliStatement.php:137

Debug trace:

error - Uncaught Throwable of type mysqli_sql_exception thrown with message "Unknown column 'c.params_shipping' in 'field list'". Stack trace: #0 [ROOT]\libraries\vendor\joomla\database\src\Mysqli\MysqliStatement.php(137): mysqli->prepare('SELECT c.cart, ...') #1 [ROOT]\libraries\vendor\joomla\database\src\Mysqli\MysqliDriver.php(1089): Joomla\Database\Mysqli\MysqliStatement->__construct(Object(mysqli), 'SELECT c.cart, ...') #2 [ROOT]\libraries\vendor\joomla\database\src\DatabaseDriver.php(1900): Joomla\Database\Mysqli\MysqliDriver->prepareStatement('SELECT c.cart, ...') #3 [ROOT]\administrator\components\com_phocacart\libraries\phocacart\cart\db.php(42): Joomla\Database\DatabaseDriver->setQuery(Object(Joomla\Database\Mysqli\MysqliQuery)) #4 [ROOT]\administrator\components\com_phocacart\libraries\phocacart\cart\cart.php(166): PhocacartCartDb::getCartDb(395) #5 [ROOT]\administrator\components\com_phocacart\libraries\phocacart\cart\rendercheckout.php(27): PhocacartCart->__construct() #6 [ROOT]\components\com_phocacart\views\checkout\view.html.php(123): PhocacartCartRendercheckout->__construct() #7 [ROOT]\libraries\src\MVC\Controller\BaseController.php(645): PhocaCartViewCheckout->display() #8 [ROOT]\components\com_phocacart\controller.php(53): Joomla\CMS\MVC\Controller\BaseController->display(false, Array) #9 [ROOT]\libraries\src\MVC\Controller\BaseController.php(678): PhocaCartController->display() #10 [ROOT]\components\com_phocacart\phocacart.php(18): Joomla\CMS\MVC\Controller\BaseController->execute('') #11 [ROOT]\libraries\src\Dispatcher\LegacyComponentDispatcher.php(71): require_once('C:\\wamp64\\www\\c...') #12 [ROOT]\libraries\src\Dispatcher\LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}('C:\\wamp64\\www\\c...') #13 [ROOT]\libraries\src\Component\ComponentHelper.php(361): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() #14 [ROOT]\libraries\src\Application\SiteApplication.php(208): Joomla\CMS\Component\ComponentHelper::renderComponent('com_phocacart') #15 [ROOT]\libraries\src\Application\SiteApplication.php(249): Joomla\CMS\Application\SiteApplication->dispatch() #16 [ROOT]\libraries\src\Application\CMSApplication.php(293): Joomla\CMS\Application\SiteApplication->doExecute() #17 [ROOT]\includes\app.php(61): Joomla\CMS\Application\CMSApplication->execute() #18 [ROOT]\index.php(32): require_once('C:\\wamp64\\www\\c...') #19 {main}

Re: 1054 Error

Posted: 25 Jul 2023, 17:32
by Jan
Hi, this looks like your website was not correctly updated and it misses this column.

It was added in: administrator/components/com_phocacart/update/sql/mysql/3.5.5.sql
ALTER TABLE `#__phocacart_orders` ADD COLUMN `params_shipping` text;

but not sure if this is the right table as I don't see the full message, it can be even problem when updating from Beta to RC:

ALTER TABLE `#__phocacart_cart_multiple` ADD COLUMN `params_shipping` text;

Try to check if you have params_shipping in both tables.

Jan

Re: 1054 Error

Posted: 25 Jul 2023, 18:50
by Nidzo
Thank you Jan. Problem was corrupted phocacart_cart_multiple table
My problem solved!

Re: 1054 Error

Posted: 29 Jul 2023, 14:32
by Jan
Ok, great to hear it.

Jan

Re: 1054 Error

Posted: 08 Aug 2023, 22:34
by p.luks
I had the same problem. When updating from version 3.5.7 to version 4.0.7, the DB changes from 4.0.0.sql were not made.

The changes in 4.0.0.sql are commented out, as well as in 4.0.2.sql.

I made the changes for the "#__phocacart_cart_multiple" tables manually (added params_shipping and params_payment columns).

One question I still have:
Do the other changes from the two files need to be made as well?