[BUGFIX] Do workspace overlay for not translated file meta data 32/34832/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Sat, 15 Nov 2014 14:11:14 +0000 (15:11 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Sun, 30 Nov 2014 23:14:21 +0000 (00:14 +0100)
Previously the FileMetadataOverlayAspect only did a version/ workspace overlay
for translated metadata records, which meant that changes to
default language meta data records did not show up during preview.

Fix this by properly overlaying also the default language record.

Resolves: #62986
Releases: 6.2, master
Change-Id: I5b7b0f9ab20d5539107b6fd2e2872a8bd4003454
Reviewed-on: http://review.typo3.org/34832
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
typo3/sysext/frontend/Classes/Aspect/FileMetadataOverlayAspect.php

index fb9bbd1..ed4e050 100644 (file)
@@ -33,14 +33,16 @@ class FileMetadataOverlayAspect {
         * @return void
         */
        public function languageAndWorkspaceOverlay(\ArrayObject $data) {
-               $overlayedMetaData = $this->getTsfe()->sys_page->getRecordOverlay(
+               $overlaidMetaData = $data->getArrayCopy();
+               $this->getTsfe()->sys_page->versionOL('sys_file_metadata', $overlaidMetaData);
+               $overlaidMetaData = $this->getTsfe()->sys_page->getRecordOverlay(
                        'sys_file_metadata',
-                       $data->getArrayCopy(),
+                       $overlaidMetaData,
                        $this->getTsfe()->sys_language_content,
                        $this->getTsfe()->sys_language_contentOL
                );
-               if ($overlayedMetaData !== NULL) {
-                       $data->exchangeArray($overlayedMetaData);
+               if ($overlaidMetaData !== NULL) {
+                       $data->exchangeArray($overlaidMetaData);
                }
        }