VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: blackrat999 on November 11, 2017, 17:22:50 PM

Title: 1064 You have an error in your SQL syntax - order not confirming
Post by: blackrat999 on November 11, 2017, 17:22:50 PM
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 3

Site has been working fine, regular orders going through and then a Paypal order doesnt "confirm" but payment has gone through so trying to mark it as confirmed so the order emails are sent and get this error.

J 3.8.1
VM 3.2.4
https://www.easyhit.co.uk

Any ideas please?
Title: Re: 1064 You have an error in your SQL syntax - order not confirming
Post by: Milbo on November 12, 2017, 00:10:38 AM
"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 3
"

cant do anyhting with it. Please check the joomla log directory. Maybe the virtuemart log has more information. For example the query.
Title: Re: 1064 You have an error in your SQL syntax - order not confirming
Post by: GJC Web Design on November 12, 2017, 10:40:51 AM
If u turn on Joomla debug you should see the call stack so you can report where the query is formed
Title: Re: 1064 You have an error in your SQL syntax - order not confirming
Post by: blackrat999 on November 13, 2017, 12:33:32 PM
Ok thanks both..
There is nothing in the Joomla log files relating to that date or the same error

looked in :
com_virtuemart.log.php
paypal.2.log.php
error.php

QuoteIf u turn on Joomla debug you should see the call stack so you can report where the query is formed

I have turned this on but I dont see anything different on any pages, where should i be looking?
thanks
Title: Re: 1064 You have an error in your SQL syntax - order not confirming
Post by: blackrat999 on November 13, 2017, 14:00:54 PM
Probably as a result of having debug on i have been able to create the invoice but when i try and change it to "confirmed" i get this

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 '' at line 3
    /home/easyhit/public_html/libraries/joomla/database/driver/mysqli.php:650

Call stack
#    Function    Location
1    ()    JROOT/libraries/joomla/database/driver/mysqli.php:650
2    JDatabaseDriverMysqli->execute()    JROOT/libraries/joomla/database/driver.php:1730
3    JDatabaseDriver->loadResult()    JROOT/plugins/vmcustom/ordersave/ordersave.php:166
4    plgVmCustomOrdersave->plgVmOrdersave()    JROOT/plugins/vmcustom/ordersave/ordersave.php:52
5    plgVmCustomOrdersave->plgVmOnUpdateOrderPayment()    JROOT/libraries/joomla/event/event.php:70
6    JEvent->update()    JROOT/libraries/joomla/event/dispatcher.php:160
7    JEventDispatcher->trigger()    JROOT/administrator/components/com_virtuemart/models/orders.php:943
8    VirtueMartModelOrders->updateStatusForOneOrder()    JROOT/administrator/components/com_vminvoice3/models/order.php:1799
9    VMInvoice3ModelOrder::updateState()    JROOT/administrator/components/com_vminvoice3/models/invoices.php:350
10    VMInvoice3ModelInvoices->updateStates()    JROOT/administrator/components/com_vminvoice3/controllers/invoices.php:65
11    VMInvoice3ControllerInvoices->display()    JROOT/libraries/src/MVC/Controller/BaseController.php:710
12    Joomla\CMS\MVC\Controller\BaseController->execute()    JROOT/administrator/components/com_vminvoice3/vminvoice3.php:54
13    require_once()    JROOT/libraries/src/Component/ComponentHelper.php:381
14    Joomla\CMS\Component\ComponentHelper::executeComponent()    JROOT/libraries/src/Component/ComponentHelper.php:356
15    Joomla\CMS\Component\ComponentHelper::renderComponent()    JROOT/libraries/src/Application/AdministratorApplication.php:101
16    Joomla\CMS\Application\AdministratorApplication->dispatch()    JROOT/libraries/src/Application/AdministratorApplication.php:159
17    Joomla\CMS\Application\AdministratorApplication->doExecute()    JROOT/libraries/src/Application/CMSApplication.php:267
18    Joomla\CMS\Application\CMSApplication->execute()    JROOT/administrator/index.php:51
Title: Re: 1064 You have an error in your SQL syntax - order not confirming
Post by: Jörgen on November 14, 2017, 07:27:00 AM
Hello

What is this plugin ?
JROOT/plugins/vmcustom/ordersave/ordersave.php:166

regards

Jörgen @ Kreativ Fotografi