Error 1064 on attepmt to save configuration

  • Posts: 73
  • Thank you received: 0
7 years 9 months ago #263082

-- url of the page with the problem -- : www.sokart.ch/cms
-- HikaShop version -- : 2.6.4
-- Joomla version -- : Joomla! 3.6.5 Stable
-- PHP version -- : 5.6.30
-- Browser(s) name and version -- : 51.0.1
-- Error-message(debug-mod must be tuned on) -- : An error has occurred.

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1 SQL=SELECT category_id FROM #__hikashop_category WHERE category_type='product' AND category_parent_id= LIMIT 1

On attempt to save Configuration:

An error has occurred.

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1 SQL=SELECT category_id FROM #__hikashop_category WHERE category_type='product' AND category_parent_id= LIMIT 1

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
7 years 9 months ago #263087

Hi,

Change the line:
$query = 'SELECT category_id FROM '.hikashop_table('category').' WHERE category_type=\'product\' AND category_parent_id='.$root.' LIMIT 1';
to:
$query = 'SELECT category_id FROM '.hikashop_table('category').' WHERE category_type=\'product\' AND category_parent_id='.(int)$root.' LIMIT 1';
in the file administrator/components/com_hikashop/views/config/view.html.php and that will remove the error.
This error indicates that the root category has been deleted, and that shouldn't happen normally. You should click on the "check database" button in order to fix that.

The following user(s) said Thank You: sokartch

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

Time to create page: 0.060 seconds
Powered by Kunena Forum