Project

General

Profile

Actions

Bug #45236

closed

makeLocalizationPanel throws an error

Added by Arno Dudek about 11 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-02-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Tested in TYPO3 4.5 and 4.7.

In the function class.ux_db_list_extra.php file class.ux_db_list_extra.php on line 1520 the variable $translations can be an array and a string if there are translated records. If there is a translated record $this->translateTools->translationInfo returns somthing like this:

string(107) "Record "tt_news_166" seems to be a translation already (has a language value "2", relation to record "165")" 

In the next line
$this->translations = $translations['translations'];

Will not ask if is an array so you get an error

PHP Warning: Illegal string offset 'translations' in /home/public_html/typo3/class.db_list_extra.inc line 1522

In the file class.t3lib_tceforms.php in the function registerDefaultLanguageData in line 3485 there will be ask if an array is returned. Perhaps it should be like this.

$tInfo = $t8Tools->translationInfo($lookUpTable, intval($rec[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]), $prL['uid']);
if (is_array($tInfo['translations']) && is_array($tInfo['translations'][$prL['uid']])) {
    $this->additionalPreviewLanguageData[$table . ':' . $rec['uid']][$prL['uid']] = t3lib_BEfunc::getRecordWSOL($table, intval($tInfo['translations'][$prL['uid']]['uid']));
}

Actions

Also available in: Atom PDF