Getting an error when searching the English site but not the French site

  • Posts: 38
  • Thank you received: 1
6 years 3 months ago #285035

-- url of the page with the problem -- : casamerchants.com.178-238-236-185.inlingosolutions.com/en/
-- HikaShop version -- : 3.2.2
-- Joomla version -- : 3.7.5
-- PHP version -- : 5.6.3
-- Browser(s) name and version -- : Firefox/Chrome
-- Error-message(debug-mod must be tuned on) -- : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') GROUP BY (a.product_id) ORDER BY a.product_modified DESC LIMIT 0, 47' at line 1

Hi,

Once I activate the Hikashop search module and try to search on the EN, I get the above error:
http://......com/en/

Please note that I am not getting this error when on the FR site:
http://......com/fr/

If I deactivate the HikaShop categories search plugin and HikaShop products search plugins, all works fine but of course without the Hikashop search results.

Thanks,
Saad

Last edit: 6 years 2 months ago by soule.

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

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
6 years 3 months ago #285039

Hi,

In the file /libraries/joomla/database/exception/executing.php temporarily replace the line:
parent::__construct($message, $code, $previous);
by:
parent::__construct($message.' '.$query, $code, $previous);
That way, the error message will contain the full MySQL query and that will help us understand what's wrong with it.

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

  • Posts: 38
  • Thank you received: 1
6 years 3 months ago #285064

Thank you Nicolas.

Please see the full sql below.
The issue seems to be in the where clause, a.product_id NOT IN (53,54,)
It seems missing that it is missing a product id. What is this exclusion about?

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 category_id
FROM aaa_hikashop_product AS a INNER JOIN aaa_hikashop_product_category AS b ON a.product_id=b.product_id
WHERE a.product_published=1 AND a.product_type='main' AND (a.product_access = 'all' OR a.product_access LIKE '%,1,%')
AND b.category_id IN (2,12,14,15,31,32,34,44,39,36,45,46,47,48,49,50) AND ((((a.product_name LIKE '%test%')))
OR (((a.product_description LIKE '%test%')))) AND a.product_id NOT IN (53,54,)
GROUP BY (a.product_id) ORDER BY a.product_modified DESC LIMIT 0, 47

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

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
6 years 3 months ago #285068

Hi,

Thank you.
This error indicates that there are some missing translations in Falang for some of your products.
I've added a patch to avoid the issue.
Download the install package on our website and install it on yours and that will add the patch for that.

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

  • Posts: 38
  • Thank you received: 1
6 years 2 months ago #285212

Thank you, Nicolas.

I am now getting a different error: (a reference id is missing in the where clause)
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '102,67,73)' at line 1
SELECT * FROM ****_falang_content WHERE reference_table='hikashop_product' AND language_id='1' AND published=1 AND reference_id IN (53,54,,102,67,73)

Thanks,
Saad

Last edit: 6 years 2 months ago by soule.

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

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
6 years 2 months ago #285214

Hi,

Thank you.
I've added a patch to avoid that issue too.
Download the install package on our website and install it on yours and that will add the patch for that too.

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

  • Posts: 38
  • Thank you received: 1
6 years 2 months ago #285226

Thank you, Nicolas.

I am still getting this error: (I used version v3.2.2_2018-01-01_19-06-43 )

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '102,67,73)' at line 1 SELECT * FROM ***_falang_content WHERE reference_table='hikashop_product' AND language_id='1' AND published=1 AND reference_id IN (53,54,,102,67,73)

Thanks,
Saad

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

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
6 years 2 months ago #285240

Hi,

I've added another patch, please try again.

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

  • Posts: 38
  • Thank you received: 1
6 years 2 months ago #285346

Fixed.

Thank you Nicolas.

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

  • Posts: 38
  • Thank you received: 1
6 years 1 month ago #287956

Hi Nicolas,

I upgraded to the latest version and I am seeing this issue again:


You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1,22) AND file_type='product' ORDER BY file_ref_id ASC, file_ordering DESC, file' at line 1 SELECT * FROM e3sfn_hikashop_file WHERE file_ref_id IN (139,75,53,54,,1,22) AND file_type='product' ORDER BY file_ref_id ASC, file_ordering DESC, file_id ASC

Please advise.

Thanks,
Saad

Last edit: 6 years 1 month ago by soule.

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

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
6 years 1 month ago #287960

Hi,

It's note the same error. It's another error in a different MySQL query.
I've added some patches for it.
Download the install package again on our website and install it on yours and that should fix that issue.

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

  • Posts: 38
  • Thank you received: 1
6 years 1 month ago #288009

Thank you, Nicolas.

This is fixed.

Thanks,
Saad

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

Time to create page: 0.080 seconds
Powered by Kunena Forum