1054 error on filters

  • Posts: 46
  • Thank you received: 1
  • Hikashop Business
9 years 9 months ago #190512

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- PHP version -- :
-- Error-message(debug-mod must be tuned on) -- : Oh, dear, we have a 1054
Unknown column 'Array' in 'order clause' SQL=SELECT DISTINCT b.* FROM a04i_hikashop_product_category AS a LEFT JOIN a04i_hikashop_product AS b ON a.product_id=b.product_id WHERE b.product_published=1 AND b.product_type = 'main' AND a.category_id IN (12) AND b.product_quantity!=0 AND (b.product_access = 'all' OR b.product_access LIKE '%,9,%') ORDER BY Array DESC LIMIT 0, 18

Hi
I've been trying to set up as single drop down filter to allow filtering on name and price.

I've set it up on the top level category allowing all sub categories, to apply on sort and to sort on price and product name as per the example in the documentation.

The filter drop down appears per the image attached.

When selecting an option I get the following error:

Oh, dear, we have a 1054
Unknown column 'Array' in 'order clause' SQL=SELECT DISTINCT b.* FROM a04i_hikashop_product_category AS a LEFT JOIN a04i_hikashop_product AS b ON a.product_id=b.product_id WHERE b.product_published=1 AND b.product_type = 'main' AND a.category_id IN (16) AND b.product_quantity!=0 AND (b.product_access = 'all' OR b.product_access LIKE '%,9,%') ORDER BY Array ASC LIMIT 0, 18

Any help would be greatly appreciated.

Thanks in advance

KH

Attachments:
Last edit: 9 years 9 months ago by vividfish.

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
9 years 9 months ago #190555

Hi,

We've fixed the issue on our end. Please download again the install package of HikaShop via the menu My account>My subscriptions on our website and install it on yours and it will add the patch to fix the issue.

Please Log in or Create an account to join the conversation.

  • Posts: 46
  • Thank you received: 1
  • Hikashop Business
9 years 9 months ago #190587

Hi Nicolas

I've downloaded and installed the updated package but still have the same issue.

Which were the files that have been updated - I could ftp them in to place to ensure that they are the ones being used.

Or do you have any other suggestions?

Thanks

KH

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
9 years 9 months ago #190607

Hi,

Replace the file administrator/components/com_hikashop/classes/filter.php with the one in this archive and that will do it:

File Attachment:

File Name: filter_2015-02-13.zip
File Size:16 KB

Attachments:
The following user(s) said Thank You: vividfish

Please Log in or Create an account to join the conversation.

  • Posts: 46
  • Thank you received: 1
  • Hikashop Business
9 years 9 months ago #190610

Hi

That's fixed it.

Thank you. :)
KH

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 1
9 years 9 months ago #190655

Hi Nicolas,

I have nearly the same error, after updating with the full 2.3.5 package and the patch file in message #190607, without debug mode:

1054 - Unknown column 'Array' in 'order clause' SQL=SELECT DISTINCT b.* FROM bcn_hikashop_product_category AS a LEFT JOIN (SELECT * FROM bcn_hikashop_product AS product1 LEFT JOIN bcn_hikashop_price AS price1 ON product1.product_id=price1.price_product_id WHERE (price1.price_access = 'all' OR price1.price_access LIKE '%,1,%' OR ISNULL(price1.price_access)) AND product1.product_type='main' GROUP BY product1.product_id ORDER BY price1.price_min_quantity ASC) AS b ON a.product_id=b.product_id WHERE b.product_published=1 AND b.product_type = 'main' AND a.category_id IN (31) AND (b.product_access = 'all' OR b.product_access LIKE '%,1,%') ORDER BY Array ASC LIMIT 0, 20

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4

Sorting on price and product name, single dropdown; configured like youtr example on www.hikashop.com/images/filters/filters_example2.jpg :

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 9 months ago #190656

Hi,

Did you try with the file provided by Nicolas ?
( www.hikashop.com/forum/filters-search/87...-filters.html#190607 )

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 1
9 years 9 months ago #190693

Yes, as mentioned in my message.

Let me know if you can not reproduce this problem. Than I can make you an admin account for troubleshooting.

TIA
Best regards,
Joris

Please Log in or Create an account to join the conversation.

  • Posts: 46
  • Thank you received: 1
  • Hikashop Business
9 years 9 months ago #190695

Did you delete the filters that are currently set up and create new ones? I found that this was needed in addition to uploading the updated file.

KH

Last edit: 9 years 9 months ago by vividfish.

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 1
9 years 9 months ago #190697

Thanks for this hint.
I tried everything with cache etc., but this was the solution.

Have a nice day,
Joris

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 0
9 years 9 months ago #191656

Hello,

The updated "filter.php" solved a problem I had with a sort filter.

But, it introduced a strange new div when I add a cursor filter.
The div has no name so it mess up my css code.
Can you correct it ?

Best regards

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 9 months ago #191663

Hi,

It will be interesting to have the raw content (from the source code and not the inspector).
The inspector can "alter" the content in order to let him feet to the HTML specifications.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 0
9 years 9 months ago #191683

Please find a small capture of the code.
In red : a cursor filter after changing filter.php
In blue : a cursor filter made before changing filter.php

Do you need the full html page ?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 0
9 years 9 months ago #191711

Hello,

Not directly related but I also got small errors in the code for the Sort filter (<label> missing ?)

Attachments:
Last edit: 9 years 9 months ago by dezajn.

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
9 years 9 months ago #191745

Hi,

Here is the latest version of the filter.php file with a class added to that div so that you can still it like you want.

File Attachment:

File Name: filter_2015-02-23.zip
File Size:16 KB

Attachments:
The following user(s) said Thank You: dezajn

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 0
9 years 9 months ago #191851

Hello,

The last update solved many things.
I think the cursor filter on lenght is slightly different then cursor filter on custom fields on purpose. I could probably CSS the differences.

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 108
  • Thank you received: 1
9 years 8 months ago #192583

I'm running currently the latest essential version.
trying to search bring the following error:

Unknown column 'a.product_descriptio' in 'where clause' SQL=SELECT DISTINCT a.product_id AS id, a.product_name, a.product_alias, a.product_canonical, a.product_created AS created , a.product_description, "1" AS browsernav, b.category_id as - 1054 category_id FROM ig52r_hikashop_product AS a INNER JOIN ig52r_hikashop_product_category AS b ON a.product_id=b.product_id WHERE a.product_published=1 AND a.product_type='main' AND b.category_id IN (2,12,85,78,79,80,76,77,70,71,72,16,83,84,17,51,52,53,54,55,56,57,58,59,60,61,62,63,50,64,47,48,49,24,81,82,25,74,75,68,69,65,66,67,73,30,31,32,34,35,36,37,38,39,40,41,42,43,44,45,46,86,87,88,89,90,91,92) AND ((((a.product_name LIKE '%lego%'))) OR (((a.product_descriptio LIKE '%lego%'))) OR (((a.PRODUCT_SKUn LIKE '%lego%')))) GROUP BY (a.product_id) ORDER BY a.product_modified DESC LIMIT 0, 50

please advise.

Thank you.

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
9 years 8 months ago #192589

Hi,

There are no filters in the Essential edition so your question is not related to this thread.
You must be using the normal search system of Joomla and you must have enabled the HikaShop products search plugin.
The issue here is that in the columns option of the plugin, you selected a product_descriptio column which doesn't exist.
I believe that you deleted the n at the end of the word and that you wanted to write product_description.

Please Log in or Create an account to join the conversation.

Time to create page: 0.115 seconds
Powered by Kunena Forum