1054 Error

Phoca Cart - complex e-commerce extension
neigerdesign1
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 15 Aug 2022, 23:46

1054 Error

Post 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

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: 1054 Error

Post 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
If you find Phoca extensions useful, please support the project
User avatar
adroussel
Phoca Member
Phoca Member
Posts: 12
Joined: 20 Feb 2022, 16:39

Re: 1054 Error

Post 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
User avatar
adroussel
Phoca Member
Phoca Member
Posts: 12
Joined: 20 Feb 2022, 16:39

Re: 1054 Error

Post by adroussel »

Issue seems to be from
#__phocacart_cart_multiple missing that column
Do you think there are other schema differnces between both versions?
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9435
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: 1054 Error

Post 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
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 387
Joined: 07 Nov 2018, 14:55

Re: 1054 Error

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

Re: 1054 Error

Post 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
If you find Phoca extensions useful, please support the project
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 387
Joined: 07 Nov 2018, 14:55

Re: 1054 Error

Post by Nidzo »

Thank you Jan. Problem was corrupted phocacart_cart_multiple table
My problem solved!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: 1054 Error

Post by Jan »

Ok, great to hear it.

Jan
If you find Phoca extensions useful, please support the project
p.luks
Phoca Member
Phoca Member
Posts: 48
Joined: 19 Jan 2020, 20:51

Re: 1054 Error

Post 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?
Post Reply