View Issue Details

IDProjectCategoryView StatusLast Update
0007157OXID eShop (all versions)4.01. Database handlingpublic2020-07-10 11:42
Reporterpbenke 
PrioritynormalSeveritymajorReproducibilityalways
Status feedbackResolutionopen 
Product Version6.1.6 
Target VersionFixed in Version 
Summary0007157: Error in SQL statement on language en, if MySQL runs in STRICT_MODE
DescriptionFile:
vendor/oxid-esales/oxideshop-ce/source/Application/Model/ActionList.php

Row 131:
if(EXISTS(select 1 from oxobject2action, $sGroupTable where $sGroupTable.oxid=oxobject2action.oxobjectid and oxobject2action.oxactionid=$sTable.OXID and oxobject2action.oxclass='oxgroups' LIMIT 1),

=> This is wrong, the condition "$sTable.OXID" cannot work, because $sTable is not defined in "from"-clause.

=> Correct:
if(EXISTS(select 1 from oxobject2action, $sGroupTable, $sTable where $sGroupTable.oxid=oxobject2action.oxobjectid and oxobject2action.oxactionid=$sTable.OXID and oxobject2action.oxclass='oxgroups' LIMIT 1),

(...from oxobject2action, $sGroupTable, ***$sTable*** where...)
Steps To ReproduceMulti-language shop e.g. de/en
Set MySQL to Strictmode => /log/oxideshop.log will be filled with...
Unknown column 'oxv_oxactions_en.OXID' in 'where clause'...
TagsDatabase, SQL
ThemeNot defined
BrowserNot defined
PHP Version7.1
Database VersionMySQL 5.6

Activities

QA

2020-07-10 11:42

administrator   ~0013264

Dear pbenke,

OXID has the Systemrequirement of MYSQL 5.5 or MYSQL 5.7, and not 5.6.

Nevertheless i tried to reproduce your report with MYSQL 5.7 but without encountering any problem.

My steps where as followed:

1. Install a fresh version of OXID
2. activate Language EN
3. Set sql_mode = strict_all_tables
4. refresh views.
5. modifie an action

can you reproduce it on an mysql 5.7 server?
i guess there is a diffrence in behavior with embedded sql-snippets like your quoted snippet.

best regard
QA -SG-