VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: antonyw on March 18, 2013, 23:26:10 PM

Title: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: antonyw on March 18, 2013, 23:26:10 PM
Hi there,

I just got the following error after upgrading from 2.0.18 to 2.0.20b:

        vmError: getNeighborProducts Unknown column 'product_price' in 'order clause' SQL=SELECT `l`.`virtuemart_product_id`, `l`.`product_name` FROM `mf0sk_virtuemart_products` as `p` JOIN `mf0sk_virtuemart_products_en_gb` as `l` using (`virtuemart_product_id`) JOIN `mf0sk_virtuemart_product_categories` as `pc` using (`virtuemart_product_id`) LEFT JOIN `mf0sk_virtuemart_product_shoppergroups` as `psgr` on (`psgr`.`virtuemart_product_id`=`l`.`virtuemart_product_id`) WHERE `virtuemart_category_id` = 6 and `slug` < "bike-helmet-1-1232012-09-21-17-58-22-1262012-09-23-21-25-25" AND ( psgr.`virtuemart_shoppergroup_id`= "2" OR psgr.`virtuemart_shoppergroup_id` IS NULL ) AND p.`published`= 1 ORDER BY product_price DESC LIMIT 0,1
        vmError: getNeighborProducts Unknown column 'product_price' in 'order clause' SQL=SELECT `l`.`virtuemart_product_id`, `l`.`product_name` FROM `mf0sk_virtuemart_products` as `p` JOIN `mf0sk_virtuemart_products_en_gb` as `l` using (`virtuemart_product_id`) JOIN `mf0sk_virtuemart_product_categories` as `pc` using (`virtuemart_product_id`) LEFT JOIN `mf0sk_virtuemart_product_shoppergroups` as `psgr` on (`psgr`.`virtuemart_product_id`=`l`.`virtuemart_product_id`) WHERE `virtuemart_category_id` = 6 and `slug` > "bike-helmet-1-1232012-09-21-17-58-22-1262012-09-23-21-25-25" AND ( psgr.`virtuemart_shoppergroup_id`= "2" OR psgr.`virtuemart_shoppergroup_id` IS NULL ) AND p.`published`= 1 ORDER BY product_price ASC LIMIT 0,1

I hope you are planning to solve this. I'm not the only one getting the above error. See this topic as well:

http://forum.virtuemart.net/index.php?topic=113052.15

UPDATE:   The error is only visible when I'm logged in with the Admin user. If I'm logged in with a normal user the error is not visible.  I forgot to mention that I see this error only on the Product Page
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: antonyw on March 19, 2013, 13:58:09 PM
this needs more attention.
I would really appreciate a developers reply. Thanks
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: Milbo on March 20, 2013, 00:44:15 AM
That means that in your session is an old variable. Store your vm config,... clear your browser cache.
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: antonyw on March 20, 2013, 01:09:07 AM
Thanks for the reply :) All good with clearing the browser cache but what do you mean by "store your vm config" ? A detailed explanation will be much appreciated :)
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: Milbo on March 20, 2013, 10:19:09 AM
The vm config is the one you find in your Backend (BE). There is a joomla config and a shop config and a vm config. The vm config is in Configuration->Configuration

update, I think I found two problems with the neighboured products. Please try the product model attached

[attachment cleanup by admin]
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: seabass on March 20, 2013, 15:24:41 PM
Update
I have added that file to /administrator/components/com_virtuemart/models/product.php
This has fixed the error.
I am now getting an info message when logged in
Info: I join price ORDER BY product_price
Info: I join price ORDER BY product_price
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: seabass on March 20, 2013, 17:16:16 PM
A temporary fix to hide the info message is in your template index file
//if ($view->hasMessages())
    //echo artxPost('<jdoc:include type="message" />');
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: Milbo on March 20, 2013, 22:11:55 PM
oh, yes I forgot to remove the vmInfo, just remove the line in the file containing it.

new file attached, should also contain the fix for ordering for category_name

[attachment cleanup by admin]
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: wakro on March 21, 2013, 13:06:59 PM
It works fine.

Thank you..
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: steeve34 on April 03, 2013, 18:09:26 PM
thank you very much for this solution, I had the same problem.
But this solution is final? is not likely to have the same problem in future updates?
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: liquid.ideas on April 08, 2013, 16:46:30 PM
Thankyou thankyou thank you Milbo!! This worked at least my products are coming up now!!

I am still getting on debug:

vmdebug checkValidOrderingField:VirtueMartModelProduct programmer choosed invalid ordering pc.ordering, use pc.ordering

Any idea why?
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: tavongap on April 10, 2013, 10:31:33 AM
Works like magic!!! Thanks ;)
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: volantiniofferte on April 16, 2013, 19:20:20 PM
Hi guys,
I write here because, I have the same problem after the update of VM, pleae see the attachment, I have tried to delete the cache of browse, but noting....
I have tried also to upded the file of product, but i'm not able to change the premission, in 777.
Can you help me?

[attachment cleanup by admin]
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: K&K media production on April 16, 2013, 19:26:51 PM
go to configuration and enable database Update tools

go to tools & migration -> DB Tools -> click on "Install or if necessary update tables"

DON'T FORGET BACKUP OF YOUR DATABASE BEFORE
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: volantiniofferte on April 16, 2013, 20:58:07 PM
Hi, I have enabled database Update tools, and I have clicked "Install or if necessary update tables".....but nothing the problem still resist  :(
Have you some other ideas?
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: K&K media production on April 16, 2013, 22:18:54 PM
have you added the file in this directory?

/administrator/components/com_virtuemart/models/product.php

and have you renamed the file from product.php.txt to product.php?

you don't need 777 permissions, simple upload the file with ftp to the directory
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: volantiniofferte on April 18, 2013, 03:59:08 AM
Hi I have tried to change permission in 777, but filezilla told me that I can't change the permission in 777...maybe there is another way to change in 777, but I don't know.
Can you explane me, please?
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: woop on April 18, 2013, 15:58:49 PM
Works GREAT!! Thanks Milbo!!
Quote from: Milbo on March 20, 2013, 22:11:55 PM
oh, yes I forgot to remove the vmInfo, just remove the line in the file containing it.

new file attached, should also contain the fix for ordering for category_name
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: jjk on April 18, 2013, 21:22:53 PM
Quote from: volantiniofferte on April 18, 2013, 03:59:08 AM
Hi I have tried to change permission in 777...
On a live website this file is usually set to 644 and like 'kkmediaproduction' said, you don't have to change it. Just overwrite the orginal file by uploading the new one with your filezilla.
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: volantiniofferte on April 20, 2013, 06:03:35 AM
Hi, I have tried, but filezile doesn't overwrite the file
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: jjk on April 20, 2013, 07:50:50 AM
Perhaps you have a Filezilla configuration problem. (I don't know anything about Filezilla, I'm using the FireFTP plugin instead). You may try to delete the file first and then upload it again. If that doesn't work either, some hints concerning ownership of files in this article might help: http://docs.joomla.org/Why_can%27t_you_install_any_extensions%3F

BTW - there is a joomla extension that usually makes it easy to change file permissions: http://extplorer.net/
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: madredeuz on April 24, 2013, 14:26:13 PM
I have the same problem

vmError: getNeighborProducts Unknown column 'category_description' in 'order clause' SQL=SELECT `l`.`virtuemart_product_id`, `l`.`product_name` FROM `j25_virtuemart_products` as `p` JOIN `j25_virtuemart_products_es_es` as `l` using (`virtuemart_product_id`) JOIN `j25_virtuemart_product_categories` as `pc` using (`virtuemart_product_id`) LEFT JOIN `j25_virtuemart_product_shoppergroups` as `psgr` on (`psgr`.`virtuemart_product_id`=`l`.`virtuemart_product_id`) WHERE `virtuemart_category_id` = 33 and `slug` < "plancha-de-corcho-8-9" AND ( psgr.`virtuemart_shoppergroup_id`= "2" OR psgr.`virtuemart_shoppergroup_id` IS NULL ) AND p.`published`= 1 ORDER BY category_description DESC LIMIT 0,1

Hiding the error message I donĀ“t think is a profesional solution.
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: K&K media production on April 24, 2013, 15:46:26 PM
Have you tried the solutions from this thread?
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: volantiniofferte on April 24, 2013, 19:48:44 PM
I not understand why I can't upload the file into the modules dir....I have red the Joomlawiki, but is all ok....
....I think that I must set the permissions on 777, but for this directory is denied
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: K&K media production on April 25, 2013, 00:32:52 AM
the directory don't need 777

you must upload it with ftp and maybe you have wrong ftp settings or you are in the wrong ftp group or or or...

but this have nothing to do with Joomla or VirtueMart...check your ftp access
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: Svetliy on May 03, 2013, 17:02:54 PM
Thanks. works magical
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: liquid.ideas on May 27, 2013, 21:17:31 PM
I still get the same error about pcordering, if i could fix it I would lt you know!
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: Homepage4us on June 15, 2013, 15:36:36 PM
Quote from: Milbo on March 20, 2013, 22:11:55 PM
oh, yes I forgot to remove the vmInfo, just remove the line in the file containing it.

new file attached, should also contain the fix for ordering for category_name

Works great now.
Thank you
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: n0ob on June 15, 2013, 17:13:01 PM
Thanks you so much Milbo  :)
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: Ahler on July 18, 2013, 15:11:55 PM
Sorry, but it doesn't work for me.

We have done the Update to VM 2.0.22a from 2.0.18 and now we get this error:

QuotegetNeighborProducts error
if we are logged in VM will shows the complete message like that one at the beginning of this thread.

Now i have uploaded the latest product.php from "MILBO" but it doesn't work for us.

So my question is what is to do in VM_config (Componentens/Virtuemart - Configuration - Configuration)?

If you want to see the site look at: www.hengelsport-kruidenier.com (http://www.hengelsport-kruidenier.com) it happens if you click on one product.

Thanks.
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: dandzaman on July 22, 2013, 20:06:43 PM
yes, same as Ahler...
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: Ahler on July 23, 2013, 09:13:21 AM
Here's someone who can help us?
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: dandzaman on July 23, 2013, 20:07:10 PM
and after puting ''milbo's'' product.php file i also get this message when I click on BUY button:
Notice: Undefined property: stdClass::$quantity in home/....
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: zeisch on September 16, 2013, 12:27:43 PM
Hi
I upgraded to 2.0.22c and I have the same problem.
When I would overwrite the product.php which is linked to in this thread much code would be gone since there were updates on that file.
Do you have an updated product.php to replace?
Regards,
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: Maxim Pishnyak on September 16, 2013, 17:29:18 PM
Why you couldn't use product.php from the last version? From the 22d for example? What is your VM version then?
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: Stonedfury on November 01, 2013, 18:50:37 PM
I am seeing this when I run debug.
Title: Re: Error after an upgrade from 2.0.18 to 2.0.20b
Post by: dandzaman on November 01, 2013, 20:08:59 PM
just to report that the problem is solved with the newest versions of Gantry and VM .