View Issue Details

IDProjectCategoryView StatusLast Update
0006014OXID eShop (all versions)2. ----- eShop backend (admin) -----public2022-02-01 13:08
Reporterd3 Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status resolvedResolutionwon't fix 
Product Version4.9.2 / 5.2.2 
Summary0006014: wrong generated SQL query for admin list, if multilang model is extended to non multilang
Descriptiondetected in EE 5.2.X...

Please imagine: I extend the multilang admin list item class (e.g. "oxarticles" in "article_list" controller) and set oxarticles_extension::$_blEmployMultilanguage = false, because I don't need multilang functionality in this case.

The oxadminlist::_prepareOrderByQuery(...) method generates now an "order by" part with an incorrect viewtable name. The query is invalid and list frame breaks with "Shop offline".
Additional Informationproblematical in oxadminlist::_prepareOrderByQuery():

$sTable = $sTable ? (getViewName($sTable, $iLangId) . '.') : '';
// it doesn't consider models multilang status

better solution:

if ($sTable && isset($this->_sListClass) && class_exists($this->_sListClass)) {
    $oListObject = oxNew($this->_sListClass);
    $sTable = $oListObject->getViewName() . '.';
} else {
    $sTable = $sTable ? (getViewName($sTable, $iLangId) . '.') : '';

TagsNo tags attached.
PHP VersionNot defined
Database VersionNot defined



2015-02-24 15:22

administrator   ~0010710

Is there any special reason to set blEmployMultilanguage = false ?


2015-02-25 10:22

reporter   ~0010717

Yes. :) We use a configuration object, which temporarily needs multi language functionality. In non multilang case, object should save informations in base language fields only.
The complete scenario is more large, a little bit abstract and go beyond the scope of this ticket.

The $_blEmployMultilanguage switch exists and there is no information, that this switch shouldn't change. Far from it. Original comment in oxi18n: "Sometimes you need to deal with all fields not only with active language, then set to false (default is true)."

There isn't a huge fault. Most methods works correctly with these option, except the described oxadminlist SQL generator.



2015-02-25 10:26

administrator   ~0010718

Thank you for clarification.


2022-01-28 16:49

administrator   ~0013559

Does fit your needs or do you need further tweaks?


2022-02-01 13:08

administrator   ~0013641

Not a current issue for Reporter anymore