Project

General

Profile

Actions

Bug #73670

closed

Page Module: View broken with localized (flux) content elements.

Added by Sabrina Sauter over 8 years ago. Updated about 6 years ago.

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

100%

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

Description

After upgrading to TYPO3 7.6.4 and on selecting the page module on pages with localized flux contents, following error is thrown:

Invalid argument supplied for foreach() in /typo3/sysext/backend/Classes/View/PageLayoutView.php line 1812

foreach ($this->contentElementCache[$lP][$colPos] as $record) {
    $key = array_search($record['t3_origuid'], $defLanguageCount);
    if ($key !== false) {
        unset($defLanguageCount[$key]);
    }
}

This is called e.g. in /typo3conf/ext/flux/Classes/View/PreviewView.php, newLanguageButton().

It seems not to check whether the incoming data is an array. Simply wrapping the above code snippet into this if-statement seems to fix it (don't know about any side effects, localization seems to work fine):

if(is_array($this->contentElementCache[$lP][$colPos])) {
    …
}

Can you look into this? Thank you.


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #73872: Invalid argument supplied for foreach in PageLayoutViewClosedMathias Schreiber2016-03-02

Actions
Actions

Also available in: Atom PDF