View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006597 | OXID ERP Interface | OXID ERP Interface - sub | public | 2017-03-01 09:06 | 2024-04-03 11:06 |
Reporter | michael_keiluweit | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
Product Version | 2.14.1 | ||||
Summary | 0006597: OXERPGet* methods doesn't return the values of multi language fields which have a number larger than 9 | ||||
Description | If a shop has more than 10 languages, the field names of the multi language fields have to digits at the end (OXTITLE_10). Currently the method \oxERPType::_getMultilangualFields is not able to read fields with more than one digit at the end | ||||
Steps To Reproduce | 1. Create 11 languages (so that the field names of the multi language fields for the eleventh language has the number 10 -> OXTITLE_10) 2. Change the value of the title for the language 11 3. Call OXERPGetArticle for that test article. You will get the value of the language 0. | ||||
Additional Information | Suggested fix by TWT: Replace: foreach ($aData as $key => $oADODBField) { $iLang = substr( $oADODBField->name, strlen( $oADODBField->name) - 1, 1); if ( is_numeric( $iLang) && substr( $oADODBField->name, strlen( $oADODBField->name) - 2, 1) == '_') { // multilangual field $sMainFld = str_replace( '_'.$iLang, "", $oADODBField->name); $aRet[$iLang][$sMainFld] = $oADODBField->name.' as '.$sMainFld; } } By: foreach ($aData as $key => $oADODBField) { // Check if it is a multi language field. // Identified by having at least one underscore in the field name and a number at the end. $aFieldNameTokens = explode('_', $oADODBField->name); $iLastIndex = count($aFieldNameTokens) - 1; if ($iLastIndex > 0 && is_numeric($aFieldNameTokens[$iLastIndex])) { // Multi language field. Remove the "language-part" and implode the rest. $iLang = $aFieldNameTokens[$iLastIndex]; array_pop($aFieldNameTokens); $sMainFld = implode('_', $aFieldNameTokens); // If a (custom) field has multiple underscores. $aRet[$iLang][$sMainFld] = $oADODBField->name.' as '.$sMainFld; } } | ||||
Tags | ERP, SOAP, Solution Provided | ||||
duplicate of | 0006595 | acknowledged | florian.auer | Read methods doesn't support _set tables (language feature) |