SQL error

  • Posts: 16
  • Thank you received: 2
7 years 11 months ago #241830

-- 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:

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: 7 years 11 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.

  • Posts: 16
  • Thank you received: 2
7 years 11 months ago #241854

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
$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.

  • Posts: 12953
  • Thank you received: 1778
7 years 11 months ago #241867

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.

  • Posts: 16
  • Thank you received: 2
7 years 11 months ago #241969

Everything seems to be allright at first glance:

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.

  • Posts: 81598
  • Thank you received: 13082
  • MODERATOR
7 years 10 months ago #242011

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.

  • Posts: 16
  • Thank you received: 2
7 years 10 months ago #242162

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.

  • Posts: 81598
  • Thank you received: 13082
  • MODERATOR
7 years 10 months ago #242165

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.

  • Posts: 502
  • Thank you received: 12
7 years 10 months ago #242386

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.

  • Posts: 16
  • Thank you received: 2
7 years 10 months ago #242395

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: https://vaconi.com/klanten/ondersteuning/ticket/trouble-tickets/67-bestelling-bevestigen-lukt-niet

The following user(s) said Thank You: fafamaster

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

  • Posts: 502
  • Thank you received: 12
7 years 10 months ago #242403

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.

  • Posts: 81598
  • Thank you received: 13082
  • MODERATOR
7 years 10 months ago #242560

Hi,

Thank you for the access, I was able to see the debug data:

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.

  • Posts: 16
  • Thank you received: 2
7 years 10 months ago #242633

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.

  • Posts: 502
  • Thank you received: 12
7 years 10 months ago #242635

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.

  • Posts: 16
  • Thank you received: 2
7 years 10 months ago #242659

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.

  • Posts: 502
  • Thank you received: 12
7 years 10 months ago #242661

Thank you for the investigation ;) !!!!!

But where is the version 2.0.2 of plugin joomlathat
?

Last edit: 7 years 10 months ago by fafamaster.

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

Time to create page: 0.074 seconds
Powered by Kunena Forum