VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: micropalla on November 21, 2016, 08:03:53 AM

Title: Error on database column pr.customer
Post by: micropalla on November 21, 2016, 08:03:53 AM
Hello!
I have recently updated from VM 3.0.16 to VM 3.0.18 but something is wrong.
As I click on a product I receive the following:

1054 - Unknown column 'pr.customer' in 'field list' SQL=SELECT `u`.*,`pr`.*,`l`.`product_name`,`rv`.`vote`, IFNULL(`u`.`name` COLLATE utf8mb4_unicode_ci, `pr`.`customer` COLLATE utf8_unicode_ci) AS customer FROM `#__virtuemart_rating_reviews` AS `pr` INNER JOIN `#__virtuemart_products_it_it` AS `l` ON `l`.`virtuemart_product_id` = `pr`.`virtuemart_product_id` LEFT JOIN `#__virtuemart_rating_votes` AS `rv` on (`pr`.`virtuemart_rating_vote_id` IS NOT NULL AND `rv`.`virtuemart_rating_vote_id`=`pr`.`virtuemart_rating_vote_id` ) XOR (`pr`.`virtuemart_rating_vote_id` IS NULL AND (`rv`.`virtuemart_product_id`=`pr`.`virtuemart_product_id` and `rv`.`created_by`=`pr`.`created_by`) ) LEFT JOIN `#__users` AS `u` ON `pr`.`created_by` = `u`.`id` WHERE `pr`.`virtuemart_product_id` = "289" ORDER BY created_on DESC LIMIT 0, 3

What's wrong?
Thank you for your help!!
Title: Re: Error on database column pr.customer
Post by: micropalla on November 21, 2016, 08:08:43 AM
I tryed to follow this https://forum.virtuemart.net/index.php?topic=135461.0 but it seems not to work (or more probably I don't execute the correct sql query, maybe you can help me...)
Title: Re: Error on database column pr.customer
Post by: GJC Web Design on November 21, 2016, 10:42:26 AM
just follow this as written

Quoteand is there a field called 'customer' in your  #__virtuemart_rating_reviews table?

If not try the vm tools table updater or just add it

customer   varchar(128)    utf8_general_ci      No    NULL
Title: Re: Error on database column pr.customer
Post by: micropalla on November 21, 2016, 10:59:00 AM
I tried but something is wrong.
I added the last line as in image.

Now it says
1054 - Unknown column 'pr.virtuemart_rating_vote_id' in 'on clause' SQL=SELECT `u`.*,`pr`.*,`l`.`product_name`,`rv`.`vote`, IFNULL(`u`.`name` COLLATE utf8mb4_unicode_ci, `pr`.`customer` COLLATE utf8_unicode_ci) AS customer FROM `#__virtuemart_rating_reviews` AS `pr` INNER JOIN `#__virtuemart_products_it_it` AS `l` ON `l`.`virtuemart_product_id` = `pr`.`virtuemart_product_id` LEFT JOIN `#__virtuemart_rating_votes` AS `rv` on (`pr`.`virtuemart_rating_vote_id` IS NOT NULL AND `rv`.`virtuemart_rating_vote_id`=`pr`.`virtuemart_rating_vote_id` ) XOR (`pr`.`virtuemart_rating_vote_id` IS NULL AND (`rv`.`virtuemart_product_id`=`pr`.`virtuemart_product_id` and `rv`.`created_by`=`pr`.`created_by`) ) LEFT JOIN `#__users` AS `u` ON `pr`.`created_by` = `u`.`id` WHERE `pr`.`virtuemart_product_id` = "169" ORDER BY created_on DESC LIMIT 0, 3
Title: Re: Error on database column pr.customer
Post by: micropalla on November 22, 2016, 08:01:31 AM
No one knows?

Mod edit:  Please do not bump. Instead read http://forum.virtuemart.net/index.php?topic=104795.0
Title: Re: Error on database column pr.customer
Post by: Milbo on November 22, 2016, 14:07:33 PM
There is no rating_vote_id, but why does the tableupdater not work for you?
Title: Re: Error on database column pr.customer
Post by: micropalla on November 22, 2016, 14:18:24 PM
It says

1060 Duplicate column name 'custom_desc' SQL=ALTER TABLE `#__virtuemart_customs` CHANGE COLUMN `custom_field_desc` `custom_desc` char(255) COMMENT 'description or unit'

Thx!!
Title: Re: Error on database column pr.customer
Post by: Milbo on November 22, 2016, 14:50:10 PM
Then you should take a look there (custom table), maybe your order of columns is not the same as in the install.sql.
Title: Re: Error on database column pr.customer
Post by: micropalla on November 22, 2016, 15:03:21 PM
What's wrong with it?
Title: Re: Error on database column pr.customer
Post by: micropalla on November 22, 2016, 19:05:41 PM
Ok, I did it. I dropped the duplicated field and used the tableupdater. Now it is all ok!
THX!!
Title: Re: Error on database column pr.customer
Post by: Milbo on November 22, 2016, 19:35:44 PM
:-) Nice. Which field was doubled?
Title: Re: Error on database column pr.customer
Post by: micropalla on November 22, 2016, 19:48:28 PM
custom_field_desc!!