Skip to main content

SQL error

More
10 years 3 months ago - 10 years 3 months ago #241830 by vaconiit
SQL error was created by vaconiit
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.4.43
-- Browser(s) name and version -- : Firefox Developer Edition 48.0a2 (2016-05-31)
-- 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 '' at line 1 SQL=SELECT * FROM #__hikashop_address WHERE address_id =

While trying to confirm an order of a client in the backend we get a SQL error:
Code:
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 '' at line 1 SQL=SELECT * FROM #__hikashop_address WHERE address_id =

Any idea what might trigger this?



Edit: found the reason... The user table was corrupt. All works as exprected now... Sorry for any inconvenience...
Last edit: 10 years 3 months ago by vaconiit. Reason: Found the reason
The following user(s) said Thank You: Jerome

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

More
10 years 3 months ago #241854 by vaconiit
Replied by vaconiit on topic SQL error
Seemed I spoke to soon.... The error returned.

It seem that when I directly try to alter the order status in the list view from , the SQL error is presented (although the order status is altered!).





Opening the order via the order number and altering the status via the "Main information" section does not trigger the error.



I figure it has something to do with line 322 of the /administrator/components/com_hikashop/controllers/order.php file
Code:
$db->setQuery('SELECT address_id FROM '.hikashop_table('address').' WHERE address_user_id = '. (int)$user_id . ' AND address_published = 1 ORDER BY address_default DESC, address_id ASC LIMIT 1');

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

More
10 years 3 months ago #241867 by Mohamed Thelji
Replied by Mohamed Thelji on topic SQL error
Hello,

Can you click on the "Check database" button via "Hikashop->System->Configuration" and test it again after the check is complete ?

Thank you.

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

More
10 years 3 months ago #241969 by vaconiit
Replied by vaconiit on topic SQL error
Everything seems to be allright at first glance:
Code:
OK Table "hikashop_address" checked OK Table "hikashop_badge" checked OK Table "hikashop_banner" checked OK Table "hikashop_cart" checked OK Table "hikashop_cart_product" checked OK Table "hikashop_category" checked OK Table "hikashop_characteristic" checked OK Table "hikashop_click" checked OK Table "hikashop_config" checked OK Table "hikashop_currency" checked OK Table "hikashop_discount" checked OK Table "hikashop_download" checked OK Table "hikashop_entry" checked OK Table "hikashop_field" checked OK Table "hikashop_file" checked OK Table "hikashop_filter" checked OK Table "hikashop_geolocation" checked OK Table "hikashop_history" checked OK Table "hikashop_limit" checked OK Table "hikashop_massaction" checked OK Table "hikashop_order" checked OK Table "hikashop_order_product" checked OK Table "hikashop_payment" checked OK Table "hikashop_price" checked OK Table "hikashop_product" checked OK Table "hikashop_product_category" checked OK Table "hikashop_product_related" checked OK Table "hikashop_plugin" checked OK Table "hikashop_shipping" checked OK Table "hikashop_shipping_price" checked OK Table "hikashop_tax" checked OK Table "hikashop_taxation" checked OK Table "hikashop_user" checked OK Table "hikashop_variant" checked OK Table "hikashop_vote" checked OK Table "hikashop_vote_user" checked OK Table "hikashop_waitlist" checked OK Table "hikashop_widget" checked OK Table "hikashop_zone" checked OK Table "hikashop_zone_link" checked OK Table "hikashop_warehouse" checked OK Table "hikashop_email_log" checked OK Product categories checked OK Variants orphan links cleaned

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

More
10 years 3 months ago #242011 by nicolas
Replied by nicolas on topic SQL error
Hi,

The error doesn't come from

$db->setQuery('SELECT address_id FROM '.hikashop_table('address').' WHERE address_user_id = '. (int)$user_id . ' AND address_published = 1 ORDER BY address_default DESC, address_id ASC LIMIT 1');

It's another MySQL query.
Please try again after activating the "debug mode" and "error reporting" settings of the Joomla configuration.
It will provide more precise information on what's going on, which will help us tell you what to do.

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

More
10 years 3 months ago #242162 by vaconiit
Replied by vaconiit on topic SQL error
To speed things up I've set up a temporary copy of the site on our LAN. Who might I PM to send the login and URL?

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

More
10 years 3 months ago #242165 by nicolas
Replied by nicolas on topic SQL error
Hi,

Please use our contact form and provide a link to this thread in your message:
www.hikashop.com/support/contact-us.html

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

More
10 years 3 months ago #242386 by fafamaster
Replied by fafamaster on topic SQL error
Hello,

i have the same problem !!! Exactly !

Can you give me a solution ???

Thank you !!!

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

More
10 years 3 months ago #242395 by vaconiit
Replied by vaconiit on topic SQL error
I still have to send them the credentials for my testing server. I will do so this evening and I will post any answer I might receive here.

Meanwhile, it might interest you that you can still confirm an order (or alter the status of the order) by clicking on the order number to view the details of the order.

Change the details and save your new status like that. I didn't get any error working like this.

If needed you see this in more detail (with images, although in dutch) over here: vaconi.com/klanten/ondersteuning/ticket/...bevestigen-lukt-niet
The following user(s) said Thank You: fafamaster

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

More
10 years 3 months ago #242403 by fafamaster
Replied by fafamaster on topic SQL error
Thank you for your quick response !

I can still confirm an order (or alter the status of the order) by clicking on the order number to view the details of the order.
It's ok for me

Thank you !

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

More
10 years 3 months ago #242560 by nicolas
Replied by nicolas on topic SQL error
Hi,

Thank you for the access, I was able to see the debug data:
Code:
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 '' at line 1 SQL=SELECT * FROM vit_hikashop_address WHERE address_id = Call stack # Function Location 1 JApplicationCms->execute() /volume1/web/justlovepaint/administrator/index.php:51 2 JApplicationAdministrator->doExecute() /volume1/web/justlovepaint/libraries/cms/application/cms.php:257 3 JApplicationAdministrator->dispatch() /volume1/web/justlovepaint/libraries/cms/application/administrator.php:152 4 JComponentHelper::renderComponent() /volume1/web/justlovepaint/libraries/cms/application/administrator.php:98 5 JComponentHelper::executeComponent() /volume1/web/justlovepaint/libraries/cms/component/helper.php:380 6 require_once() /volume1/web/justlovepaint/libraries/cms/component/helper.php:405 7 hikashopController->execute() /volume1/web/justlovepaint/administrator/components/com_hikashop/hikashop.php:54 8 JControllerLegacy->execute() /volume1/web/justlovepaint/administrator/components/com_hikashop/helpers/helper.php:1630 9 OrderController->savechangestatus() /volume1/web/justlovepaint/libraries/legacy/controller/legacy.php:728 10 OrderController->_save() /volume1/web/justlovepaint/administrator/components/com_hikashop/controllers/order.php:432 11 hikashopOrderClass->save() /volume1/web/justlovepaint/administrator/components/com_hikashop/controllers/order.php:491 12 JEventDispatcher->trigger() /volume1/web/justlovepaint/administrator/components/com_hikashop/classes/order.php:416 13 JEvent->update() /volume1/web/justlovepaint/libraries/joomla/event/dispatcher.php:160 14 call_user_func_array() /volume1/web/justlovepaint/libraries/joomla/event/event.php:69 15 plgHikashopInvoicemanager->onAfterOrderUpdate() 16 plgHikashopInvoicemanager->create_invoice() /volume1/web/justlovepaint/plugins/hikashop/invoicemanager/invoicemanager.php:34 17 JDatabaseDriver->loadObject() /volume1/web/justlovepaint/plugins/hikashop/invoicemanager/invoicemanager.php:78 18 JDatabaseDriverMysqli->execute() /volume1/web/justlovepaint/libraries/joomla/database/driver.php:1653

As you can see, the problem is with a MySQL query in the invoicemanager plugin. That's not a plugin from HikaShop. So you need to contact the developer of that plugin so tha they can tell you what to change in order to avoid the problem.
It should be an easy modification to do near the line 78 of the file plugins/hikashop/invoicemanager/invoicemanager.php
If you provide the debug data above to the developer, he will be able to tell you what to do.
The following user(s) said Thank You: vaconiit

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

More
10 years 3 months ago #242633 by vaconiit
Replied by vaconiit on topic SQL error
Thanks for the great support, I'll have a look at the Invoice manager extension and if needed contact Joomlathat.

I posted a (positive) review in the Joomla Extension Directory for Hikashop.

@fafamaster: I'll keep you posted on the Invoice manager issue if I get to know exactly what triggers the error.

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

More
10 years 3 months ago #242635 by fafamaster
Replied by fafamaster on topic SQL error
Thank you very much to all !

Nicolas thank you for your return ausi always effective, and thank you for vaconiit back!

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

More
10 years 3 months ago #242659 by vaconiit
Replied by vaconiit on topic SQL error
Germinal Camps of Joomlathat! was quick to respond.

It seemed there was a new version of the plugin available that solved the issue, but it was not published in the Invoice Manager downloads section.

Installing this new version of the plugin did resolve the issue.

More info can be found in the the Joomlathat! Forum

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

More
10 years 3 months ago - 10 years 3 months ago #242661 by fafamaster
Replied by fafamaster on topic SQL error
Thank you for the investigation ;) !!!!!

But where is the version 2.0.2 of plugin joomlathat
?
Last edit: 10 years 3 months ago by fafamaster.

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

Time to create page: 0.352 seconds
Powered by Kunena Forum