Error while creating order via backend

  • Posts: 37
  • Thank you received: 0
6 years 10 months ago #285092

-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.8.3
-- PHP version -- : 7
-- Browser(s) name and version -- : firefox
-- Error-message(debug-mod must be tuned on) -- : 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 '' at line 1

When i want to add orded via backend i get error as in error message.

Anybody had the same?

Regards
Wojciech

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 10 months ago #285095

Hi,

Please do that change in order to have the MySQL query which creates the error:
www.hikashop.com/forum/install-update/89...-version.html#277684
Then provide the MySQL query so that we have a better grasp of the situation.

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

  • Posts: 37
  • Thank you received: 0
6 years 10 months ago #285119

Hello,
After that changes, in message i have:

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 '' at line 1 select user_email from e6uxm_hikashop_user where user_id =

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 10 months ago #285123

Hi,

As far as I can see there is no such query in HikaShop.

Just before the line :

parent::__construct($message."\r\n".$query, $code, $previous);
in that libraries/joomla/database/exception/executing.php file, add temporarily the code:
var_dump(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)); exit;
That way, when the query fails, it will display the stack of PHP calls.
That will allow us to tell you where that MySQL query comes from.

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

  • Posts: 37
  • Thank you received: 0
6 years 10 months ago #285138

array(16) { [0]=> array(5) { ["file"]=> string(76) "/home/users/domyslne/public_html/libraries/joomla/database/driver/mysqli.php" ["line"]=> int(650) ["function"]=> string(11) "__construct" ["class"]=> string(27) "JDatabaseExceptionExecuting" ["type"]=> string(2) "->" } [1]=> array(5) { ["file"]=> string(69) "/home/users/domyslne/public_html/libraries/joomla/database/driver.php" ["line"]=> int(1730) ["function"]=> string(7) "execute" ["class"]=> string(21) "JDatabaseDriverMysqli" ["type"]=> string(2) "->" } [2]=> array(5) { ["file"]=> string(83) "/home/users/domyslne/public_html/plugins/hikashopshipping/paczkomaty/paczkomaty.php" ["line"]=> int(19) ["function"]=> string(10) "loadResult" ["class"]=> string(15) "JDatabaseDriver" ["type"]=> string(2) "->" } [3]=> array(5) { ["file"]=> string(65) "/home/users/domyslne/public_html/libraries/joomla/event/event.php" ["line"]=> int(70) ["function"]=> string(19) "onBeforeOrderCreate" ["class"]=> string(29) "plgHikaShopshippingPaczkomaty" ["type"]=> string(2) "->" } [4]=> array(5) { ["file"]=> string(70) "/home/users/domyslne/public_html/libraries/joomla/event/dispatcher.php" ["line"]=> int(160) ["function"]=> string(6) "update" ["class"]=> string(6) "JEvent" ["type"]=> string(2) "->" } [5]=> array(5) { ["file"]=> string(88) "/home/users/domyslne/public_html/administrator/components/com_hikashop/classes/order.php" ["line"]=> int(167) ["function"]=> string(7) "trigger" ["class"]=> string(16) "JEventDispatcher" ["type"]=> string(2) "->" } [6]=> array(5) { ["file"]=> string(92) "/home/users/domyslne/public_html/administrator/components/com_hikashop/controllers/order.php" ["line"]=> int(51) ["function"]=> string(4) "save" ["class"]=> string(18) "hikashopOrderClass" ["type"]=> string(2) "->" } [7]=> array(5) { ["file"]=> string(80) "/home/users/domyslne/public_html/libraries/src/MVC/Controller/BaseController.php" ["line"]=> int(710) ["function"]=> string(8) "neworder" ["class"]=> string(15) "OrderController" ["type"]=> string(2) "->" } [8]=> array(5) { ["file"]=> string(89) "/home/users/domyslne/public_html/administrator/components/com_hikashop/helpers/helper.php" ["line"]=> int(1837) ["function"]=> string(7) "execute" ["class"]=> string(40) "Joomla\CMS\MVC\Controller\BaseController" ["type"]=> string(2) "->" } [9]=> array(5) { ["file"]=> string(83) "/home/users/domyslne/public_html/administrator/components/com_hikashop/hikashop.php" ["line"]=> int(71) ["function"]=> string(7) "execute" ["class"]=> string(18) "hikashopController" ["type"]=> string(2) "->" } [10]=> array(4) { ["file"]=> string(76) "/home/users/domyslne/public_html/libraries/src/Component/ComponentHelper.php" ["line"]=> int(381) ["args"]=> array(1) { [0]=> string(83) "/home/users/domyslne/public_html/administrator/components/com_hikashop/hikashop.php" } ["function"]=> string(12) "require_once" } [11]=> array(5) { ["file"]=> string(76) "/home/users/domyslne/public_html/libraries/src/Component/ComponentHelper.php" ["line"]=> int(356) ["function"]=> string(16) "executeComponent" ["class"]=> string(36) "Joomla\CMS\Component\ComponentHelper" ["type"]=> string(2) "::" } [12]=> array(5) { ["file"]=> string(87) "/home/users/domyslne/public_html/libraries/src/Application/AdministratorApplication.php" ["line"]=> int(101) ["function"]=> string(15) "renderComponent" ["class"]=> string(36) "Joomla\CMS\Component\ComponentHelper" ["type"]=> string(2) "::" } [13]=> array(5) { ["file"]=> string(87) "/home/users/domyslne/public_html/libraries/src/Application/AdministratorApplication.php" ["line"]=> int(159) ["function"]=> string(8) "dispatch" ["class"]=> string(47) "Joomla\CMS\Application\AdministratorApplication" ["type"]=> string(2) "->" } [14]=> array(5) { ["file"]=> string(77) "/home/users/domyslne/public_html/libraries/src/Application/CMSApplication.php" ["line"]=> int(267) ["function"]=> string(9) "doExecute" ["class"]=> string(47) "Joomla\CMS\Application\AdministratorApplication" ["type"]=> string(2) "->" } [15]=> array(5) { ["file"]=> string(56) "/home/users/domyslne/public_html/administrator/index.php" ["line"]=> int(51) ["function"]=> string(7) "execute" ["class"]=> string(37) "Joomla\CMS\Application\CMSApplication" ["type"]=> string(2) "->" } }

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 10 months ago #285139

Hi,

Thanks.
As expected, that error doesn't come from HikaShop.
It comes from a shipping plugin called "paczkomaty" that you're using. That shipping plugin is doing that MySQL query.
I suppose that the developer of that plugin didn't expect that the order_id of an order could be empty (when the order is being created).
The query is located just before line 19 of the file /plugins/hikashopshipping/paczkomaty/paczkomaty.php

The following user(s) said Thank You: Labas

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

Time to create page: 0.051 seconds
Powered by Kunena Forum