Author Topic: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT  (Read 3663 times)

n3tz

  • Beginner
  • *
  • Posts: 2
  • A beginner
1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
« 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?

K&K media production

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 838
  • VirtueMart Version: VM3 on J3
Re: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
« Reply #1 on: January 12, 2017, 00:50:03 am »
1. Configuration -> Enable database Update tools

2. Tools -> Tools & Migration -> Install or if necessary update tables

n3tz

  • Beginner
  • *
  • Posts: 2
  • A beginner
Re: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
« Reply #2 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.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4341
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
« Reply #3 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.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
« Reply #4 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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

emedina

  • Jr. Member
  • **
  • Posts: 51
Re: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
« Reply #5 on: January 24, 2017, 13:13:15 pm »
Why don't you alter table in phpmyadmin and add that fields manually?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: 1054 - Unknown column 'searchable' in 'where clause' SQL=SELECT
« Reply #6 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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/