View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006014 | OXID eShop (all versions) | 2. ----- eShop backend (admin) ----- | public | 2015-01-09 14:27 | 2022-02-01 13:08 |
Reporter | d3 | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | have not tried |
Status | resolved | Resolution | won't fix | ||
Product Version | 4.9.2 / 5.2.2 | ||||
Summary | 0006014: wrong generated SQL query for admin list, if multilang model is extended to non multilang | ||||
Description | detected 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 Information | problematical 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) . '.') : ''; } | ||||
Tags | No tags attached. | ||||
Theme | All | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
Is there any special reason to set blEmployMultilanguage = false ? |
|
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) |
|
Thank you for clarification. |
|
Does https://github.com/OXID-eSales/oxideshop_ce/blob/712f4826d2190c33ad712ee028f5feb582d13133/source/Application/Controller/Admin/AdminListController.php#L303 fit your needs or do you need further tweaks? |
|
Not a current issue for Reporter anymore |