[BUGFIX] Use language overlay for image rendering 10/28210/3
authorAlexander Stehlik <alexander.stehlik@googlemail.com>
Mon, 10 Mar 2014 09:00:39 +0000 (10:00 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Tue, 18 Mar 2014 11:00:17 +0000 (12:00 +0100)
In the image rendering TypoScript configuration of css_styled_content
the uid is removed from the references configuration of the FILES
content object.

This makes sure that the language overlay mechanism from the FILES
content object is used.

Resolves: #56712
Releases: 6.2
Change-Id: Iaea43ca006826facfba40a846da67704dd3154ea
Reviewed-on: https://review.typo3.org/28210
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/css_styled_content/static/setup.txt
typo3/sysext/frontend/Classes/ContentObject/FilesContentObject.php

index 7dc64c6..a6026ce 100644 (file)
@@ -642,7 +642,6 @@ tt_content.image.20 {
                allImageCaptions.cObject {
                        references {
                                table = tt_content
-                               uid.field = uid
                                fieldName = image
                        }
                        renderObj = TEXT
index 7652b87..c04d796 100644 (file)
@@ -303,6 +303,17 @@ class FilesContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractConte
         * @return string Value of the config variable
         */
        protected function stdWrapValue($key, array $config, $defaultValue = '') {
+               if (isset($config[$key])) {
+                       if (!isset($config[$key . '.'])) {
+                               return $config[$key];
+                       }
+               } else {
+                       if (isset($config[$key . '.'])) {
+                               $config[$key] = '';
+                       } else {
+                               return $defaultValue;
+                       }
+               }
                $stdWrapped = $this->cObj->stdWrap($config[$key], $config[$key . '.']);
                return $stdWrapped ? $stdWrapped : $defaultValue;
        }