View Issue Details

IDProjectCategoryView StatusLast Update
0005838OXID eShop (all versions)2.6. Administer orderspublic2014-08-20 09:13
Reporterhoekie Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionunable to reproduce 
Product Version4.7.11 / 5.0.11 
Summary0005838: (Orders-Main) Ship now with Send e-mail option generates errorneous SQL statement and crashes
DescriptionThe SQL queries the wrong view.

oxv_oxdeliveryset_en vs. oxv_oxdeliveryset_nl.oxactive
Steps To ReproduceLogin /admin/, with language not equal to Shop default language.
E.g. if is Shop is Dutch, select German or English to login with.

Administer Orders
Orders
select an Order
Main
select checkbox "Send e-mail?"
click Ship now
Additional InformationErrormessage
------------
```
oxConnectionException-oxException (time: 2014-07-29 12:37:07): [1054]: mysql:EXECUTE error: [1054: Unknown column 'oxv_oxdeliveryset_nl.oxactive' in 'where clause'] in EXECUTE with parameters select oxv_oxdeliveryset_en.* from oxv_oxdeliveryset_en where ( oxv_oxdeliveryset_nl.oxactive = 1 or ( oxv_oxdeliveryset_nl.oxactivefrom < '2014-07-29 12:37:07' and oxv_oxdeliveryset_nl.oxactiveto > '2014-07-29 12:37:07' ) ) and ( select if(EXISTS(select 1 from oxobject2delivery, oxv_oxcountry_en where oxv_oxcountry_en.oxid=oxobject2delivery.oxobjectid and oxobject2delivery.oxdeliveryid=oxv_oxdeliveryset_en.OXID and oxobject2delivery.oxtype='oxdelset' LIMIT 1), EXISTS(select oxobject2delivery.oxid from oxobject2delivery where oxobject2delivery.oxdeliveryid=oxv_oxdeliveryset_en.OXID and oxobject2delivery.oxtype='oxdelset' and oxobject2delivery.OXOBJECTID='a7c40f632cdd63c52.64272623'), 1) && if(EXISTS(select 1 from oxobject2delivery, oxuser where oxuser.oxid=oxobject2delivery.oxobjectid and oxobject2delivery.oxdeliveryid=oxv_oxdeliveryset_en.OXID and oxobject2delivery.oxtype='oxdelsetu' LIMIT 1), EXISTS(select oxobject2delivery.oxid from oxobject2delivery where oxobject2delivery.oxdeliveryid=oxv_oxdeliveryset_en.OXID and oxobject2delivery.oxtype='oxdelsetu' and oxobject2delivery.OXOBJECTID='63b13eb324ffc9134015e911334522c7'), 1) && if(EXISTS(select 1 from oxobject2delivery, oxv_oxgroups_en where oxv_oxgroups_en.oxid=oxobject2delivery.oxobjectid and oxobject2delivery.oxdeliveryid=oxv_oxdeliveryset_en.OXID and oxobject2delivery.oxtype='oxdelsetg' LIMIT 1), EXISTS(select oxobject2delivery.oxid from oxobject2delivery where oxobject2delivery.oxdeliveryid=oxv_oxdeliveryset_en.OXID and oxobject2delivery.oxtype='oxdelsetg' and oxobject2delivery.OXOBJECTID in ('oxidnewcustomer', 'oxidcustomer', 'oxidsmallcust') ), 1) ) order by oxv_oxdeliveryset_en.oxpos, for user root Stack Trace: #0 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/core/adodblite/adodbSQL_drivers/mysql/mysql_driver.inc(369): adodb_throw('mysql', 'EXECUTE', 1054, 'Unknown column ...', 'select oxv_oxde...', false, Object(object_ADOConnection)) #1 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/core/adodblite/adodb.inc.php(316): mysql_driver_ADOConnection->do_query('select oxv_oxde...', -1, -1, false) #2 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/core/oxlegacydb.php(144): ADOConnection->Execute('select oxv_oxde...', false) #3 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/core/oxlist.php(391): oxLegacyDb->select('select oxv_oxde...') #4 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/application/models/oxdeliverysetlist.php(142): oxList->selectString('select oxv_oxde...') #5 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/application/models/oxdeliverysetlist.php(232): oxDeliverySetList->_getList(Object(oxUser), 'a7c40f632cdd63c...') #6 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/application/models/oxdeliverylist.php(262): oxDeliverySetList->getDeliverySetList(Object(oxUser), 'a7c40f632cdd63c...', 'c005c79251f466e...') #7 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/application/models/oxbasket.php(914): oxDeliveryList->getDeliveryList(Object(oxBasket), Object(oxUser), 'a7c40f632cdd63c...', 'c005c79251f466e...') #8 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/application/models/oxbasket.php(1500): oxBasket->_calcDeliveryCost() #9 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/application/models/oxorder.php(1625): oxBasket->calculateBasket(true) #10 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/application/controllers/admin/order_main.php(58): oxOrder->getShippingSetList() 0000011 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/core/oxshopcontrol.php(465): Order_Main->render() 0000012 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/core/oxshopcontrol.php(350): oxShopControl->_render(Object(Order_Main)) 0000013 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/core/oxshopcontrol.php(123): oxShopControl->_process('order_main', 'sendorder', NULL, NULL) 0000014 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/core/oxid.php(38): oxShopControl->start() 0000015 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/index.php(26): Oxid::run() 0000016 /srv/www/vrings/domains/vrint.dellbian-vm/httpdocs/admin/index.php(27): require_once('/srv/www/vrings...') 0000017 {main} Connection Adress --> Connection Error -->
```
TagsNo tags attached.
ThemeAzure
BrowserAll
PHP Versionany
Database Versionany

Activities

hoekie

2014-07-29 13:46

reporter   ~0010044

Please have a look here, in core/oxemail.php:

```
        $iOldTplLang = $oLang->getTplLanguage();
        $iOldBaseLang = $oLang->getTplLanguage();
...
        $oLang->setTplLanguage( $iOldTplLang );
        $oLang->setBaseLanguage( $iOldBaseLang );
```

I noticed that after sending the email, the value of:
```
  oxRegistry::getLang()->getBaseLanguage()
```
changed! So it looks like that got changed during the email process.

cesnauskast

2014-07-31 15:30

reporter   ~0010056

Reminder sent to: hoekie

Hello,

Cannot reproduce this behavior. Could you provide more information?
1. How many languages do you have enabled in your shop?
2. In what language the order was made?
3. From which admin language you are sending email?

Thanks in advance