Bug #52956
closedLanguage overlay error with sys_language_overlay=hideNonTranslated
0%
Description
When I set sys_language_overlay=hideNonTranslated I get the following expetion when I call the page in FE with GP:L > 0:
@Uncaught TYPO3 Exception
Passed variable is not an array or object, using empty array instead
InvalidArgumentException thrown in file
/htdocs/lib/typo3_src-6.2.0beta1/typo3/sysext/frontend/Classes/Aspect/FileMetadataOverlayAspect.php in line 56.
35 ArrayObject::exchangeArray(NULL)
/htdocs/lib/typo3_src-6.2.0beta1/typo3/sysext/frontend/Classes/Aspect/FileMetadataOverlayAspect.php:
00054: $this->getTsfe()->sys_language_contentOL
00055: );
00056: $data->exchangeArray($overlayedMetaData);
00057: }
00058:
34 TYPO3\CMS\Frontend\Aspect\FileMetadataOverlayAspect::languageAndWorkspaceOverlay(ArrayObject, "TYPO3\CMS\Core\Resource\Index\MetaDataRepository::recordPostRetrieval")
33 call_user_func_array(array, array)
/htdocs/lib/typo3_src-6.2.0beta1/typo3/sysext/extbase/Classes/SignalSlot/Dispatcher.php:
00148: }
00149:
00150: $slotReturn = call_user_func_array(array($object, $slotInformation['method']), $preparedSlotArguments);
00151:
00152: if ($slotReturn) {
32 TYPO3\CMS\Extbase\SignalSlot\Dispatcher::dispatch("TYPO3\CMS\Core\Resource\Index\MetaDataRepository", "recordPostRetrieval", array)
/htdocs/lib/typo3_src-6.2.0beta1/typo3/sysext/core/Classes/Resource/Index/MetaDataRepository.php:
00166: */
00167: protected function emitRecordPostRetrievalSignal(\ArrayObject $data) {
00168: $this->getSignalSlotDispatcher()->dispatch('TYPO3\\CMS\\Core\\Resource\\Index\\MetaDataRepository', 'recordPostRetrieval', array($data));
00169: }
00170:
31 TYPO3\CMS\Core\Resource\Index\MetaDataRepository::emitRecordPostRetrievalSignal(ArrayObject)
/htdocs/lib/typo3_src-6.2.0beta1/typo3/sysext/core/Classes/Resource/Index/MetaDataRepository.php:
00083:
00084: $passedData = new \ArrayObject($record);
00085: $this->emitRecordPostRetrievalSignal($passedData);
00086: return $passedData->getArrayCopy();
00087: }
30 TYPO3\CMS\Core\Resource\Index\MetaDataRepository::findByFileUid("72")@
This doesn’t happen with L=0 or sys_language_overlay=default
Updated by Rainer Becker about 11 years ago
This happens when displaying content elements (cType image) with FAL references to files without translation (new feature 6.2). As soon as I provide translations the error is gone.
Updated by Robert Heinig about 11 years ago
Had the same problem, solved it with:
Index: FileMetadataOverlayAspect.php
===================================================================
--- FileMetadataOverlayAspect.php
++ FileMetadataOverlayAspect.php (working copy)@ -53,7 +53,9
@
$this->getTsfe()->sys_language_content,
$this->getTsfe()->sys_language_contentOL
);
- $data->exchangeArray($overlayedMetaData);
if (is_array($overlayedMetaData)) {
+ $data->exchangeArray($overlayedMetaData);
+ }
}
Updated by Stefan Neufeind over 10 years ago
- Status changed from New to Resolved
Duplicate of #54169. Meanwhile resolved.