- Posts: 73
- Thank you received: 0
Error 1064 on attepmt to save configuration
9 years 7 months ago #263082
by sokartch
Error 1064 on attepmt to save configuration was created by sokartch
-- 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
-- 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.
9 years 7 months ago #263087
by nicolas
Replied by nicolas on topic Error 1064 on attepmt to save configuration
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.
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.160 seconds