VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: n3tz on January 11, 2017, 22:41:03 PM

Title: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
Post by: n3tz on January 11, 2017, 22:41:03 PM
Hi,

hope to find a solution for my problem.

I have a virtue mart project running on a debian 8 server
PHP Version 7.0.14
Virtuemart: 3.0.18

When I click on a link I get following error code:

1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT c.* FROM #__virtuemart_customs as c INNER JOIN #__virtuemart_product_customfields as pc on (c.virtuemart_custom_id=pc.virtuemart_custom_id) INNER JOIN #__virtuemart_product_categories as cat ON (pc.virtuemart_product_id=cat.virtuemart_product_id) WHERE virtuemart_category_id="10" and searchable="1" and (field_type="S" or field_type="P") GROUP BY c.virtuemart_custom_id

The strange is, that there are 2 other links in same menue that work.

I tried deleting the category in virtuemart, and creating new. Problem still exists.
Tried deleting the menue entry in joomla, and creating new. Problem still exists.

Restored to a backup from december with Joomla 3.6.4. After that I had problems installing virtuemart plugins. Only virtuemart plugins. Could not update from 3.17 version to 3.18

So I restored again, changing the data bank from Mysql pdo to mysqli.

Now I could update allinone 3.18 with all plugins.

But the above mentioned error remains.

Somebody has a clue how to resolve this?
Title: Re: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
Post by: K&K media production on January 12, 2017, 00:50:03 AM
1. Configuration -> Enable database Update tools

2. Tools -> Tools & Migration -> Install or if necessary update tables
Title: Re: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
Post by: n3tz on January 12, 2017, 01:02:45 AM
God bless you  :D
I tried it first, and it didnĀ“t work out.
Then I emptied

`jos_virtuemart_categories`
`jos_virtuemart_categories_en_gb`
and `jos_virtuemart_category_categories`

table in phpmyadmin

and tried again "Update" tables.

Then I mentioned that the IDs in the Link Url are wrong, deleted the Links in the menue and configured them again. Now it works.

Thanks mate.
Title: Re: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
Post by: Studio 42 on January 15, 2017, 23:53:03 PM
DO not use "Mysql pdo" with virtuemart, some query fails.
Note : i don't know if it's solved now, because i never got answer from dev team.
Title: Re: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
Post by: Milbo on January 18, 2017, 17:19:17 PM
hm? PDO does not work with Virtuemart, it never did. And the PDO driver in joomla had also issues. We do not use the "QueryObject" and we also dont want to change that. It is better to directly use PDO, it is not necessary to make this dependend from some config.

n3tz, when the update of your tables fails, they just contain a lot data. There is no need to put hands on the tables, just increasing the server max time that at least one table per call is updated, is enough.
Title: Re: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
Post by: emedina on January 24, 2017, 13:13:15 PM
Why don't you alter table in phpmyadmin and add that fields manually?
Title: Re: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
Post by: Milbo on January 24, 2017, 21:54:40 PM
He did alter them per phpmyadmin. But that is not necessary, usually. VM does that for you. But when there is a lot data, the server time can be to low. Because the normal time is 1-2 seconds and for the table update it could be 15 minutes or more, it depends on your data.