View Issue Details

IDProjectCategoryView StatusLast Update
0006014OXID eShop (all versions)2. ----- eShop backend (admin) -----public2015-12-01 12:29
Reporterd3 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status acknowledgedResolutionopen 
Product Version4.9.2 / 5.2.2 
Target VersionFixed in Version 
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.
ThemeAll
BrowserAll
PHP Versionany
MySQL Versionany

Activities

QA

2015-02-24 15:22

administrator   ~0010710

Is there any special reason to set blEmployMultilanguage = false ?

d3

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.

(DS)

QA

2015-02-25 10:26

administrator   ~0010718

Thank you for clarification.