Error

Phoca Cart - complex e-commerce extension
User avatar
jrjr
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 30 Nov 2018, 23:56

Error

Post by jrjr » 26 May 2020, 21:30

Just updated to 3.5.2 and am getting this error using guest checkout and also when I click options in the component
3.5.0 was ok, this didn't happen till I updated to the newest version

1054 Unknown column 'a.email_attachments' in 'field list'

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

Re: Error

Post by Jan » 27 May 2020, 21:23

Hi, email_attachments column was added in version 3.5.0

Try to open this file:
administrator\components\com_phocacart\update\sql\mysql\3.5.0.sql and your database (e.g. per phpMyAdmin) and try to manually add the SQL queries to your database (change the prefix #__ to your database prefix)

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

User avatar
jrjr
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 30 Nov 2018, 23:56

Re: Error

Post by jrjr » 27 May 2020, 21:40

But 3.5.0 was fine, no errors. It is 3.5.2 that gives the errors.
I have no idea what you mean when you say this -

Try to open this file:
administrator\components\com_phocacart\update\sql\mysql\3.5.0.sql and your database (e.g. per phpMyAdmin) and try to manually add the SQL queries to your database (change the prefix #__ to your database prefix)

I have many entries in this folder
administrator\components\com_phocacart\update\sql\mysql\
in my install that was updated to 3.5.2

The last 2 are:
3.5.0.sql
3.5.1.sql

I also have an install which is a duplicate and is working ok that is still at 3.5.0 and there is no 3.5.1 entry in the mysql folder.

I don't know SQL queries
If it matters I am using the Phoca Premiere template and everything else is updated.

I have tried the db fix as shown here but it did not help
https://www.joomlashack.com/blog/joomla ... ield-list/

Could you please explain further? Thanks

User avatar
jrjr
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 30 Nov 2018, 23:56

Re: Error

Post by jrjr » 28 May 2020, 01:33

I might also add that I updated to 3.5.2 from 3.5.0

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

Re: Error

Post by Jan » 28 May 2020, 14:49

Hi, unfortunately, here I cannot give any specific and clue advices. All the update or install function is completely managed by Joomla! Phoca Cart does not install itself, it is just installed by Joomla! extension manager. There can be a lot of different reasons why the SQL queries didn't run. But mostly if you update e.g. from 3.5.0 to 3.5.2 this should not be a problem as Joomla! system has mechanisms to update versions which are not next to each other.

It has nothing to do with template. The problem is, that while update, some columns were just not added to database and for now the only way to fix it, is to add them manually. Which mostly means: copy the SQL query, change the prefix and in phpMyAdmin just run the SQL query ... and database then just says if the column is already there or not.

So example:
open: administrator\components\com_phocacart\update\sql\mysql\3.5.0.sql

copy:

Code: Select all

ALTER TABLE `#__phocacart_order_statuses` ADD COLUMN `email_attachments` text;
ALTER TABLE `#__phocacart_orders` ADD COLUMN `terms` tinyint(1) NOT NULL default '0';
change the #__ to your database prefix, e.g.:

Code: Select all

ALTER TABLE `your_prefix_phocacart_order_statuses` ADD COLUMN `email_attachments` text;
ALTER TABLE `your_prefix_phocacart_orders` ADD COLUMN `terms` tinyint(1) NOT NULL default '0';
and run these queries in phpMyAdmin:

Image

And if another column is missing there, then do the same with another SQL query.

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

User avatar
jrjr
Phoca Enthusiast
Phoca Enthusiast
Posts: 79
Joined: 30 Nov 2018, 23:56

Re: Error

Post by jrjr » 28 May 2020, 15:08

Yes that worked! Thank you!!
I don't understand why I had to add a `terms` column but none the less, it worked!

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

Re: Error

Post by Jan » 28 May 2020, 15:12

It is assumed that if you missed the first column (email_attachment) that another column in the same block will be missing too.
If you find Phoca extensions useful, please support the project

Post Reply