[TASK] Warn for not available plugins in page module
authorGeorg Ringer <georg.ringer@gmail.com>
Wed, 19 Sep 2012 17:35:07 +0000 (19:35 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Sat, 22 Sep 2012 18:30:59 +0000 (20:30 +0200)
If a plugin of an extension is saved on a page and
the extension has been removed, a warning should be
presented to the user.

Change-Id: Ibe6994c807eb72e3cfae6850d37744df678903d0
Resolves: #41075
Releases: 6.0
Reviewed-on: http://review.typo3.org/14737
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
typo3/sysext/backend/Classes/View/PageLayoutView.php

index 2515a3f..cea48e5 100644 (file)
@@ -1300,7 +1300,13 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                if (strcmp($hookOut, '')) {
                                        $out .= $hookOut;
                                } elseif (!empty($row['list_type'])) {
-                                       $out .= '<strong>' . $GLOBALS['LANG']->sL(\TYPO3\CMS\Backend\Utility\BackendUtility::getLabelFromItemlist('tt_content', 'list_type', $row['list_type']), TRUE) . '</strong><br />';
+                                       $label = \TYPO3\CMS\Backend\Utility\BackendUtility::getLabelFromItemlist('tt_content', 'list_type', $row['list_type']);
+                                       if (!empty($label)) {
+                                               $out .=  '<strong>' . $GLOBALS['LANG']->sL($label, TRUE) . '</strong><br />';
+                                       } else {
+                                               $message = sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.noMatchingValue'), $row['list_type']);
+                                               $out .= \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $message, '', \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING)->render();
+                                       }
                                } elseif (!empty($row['select_key'])) {
                                        $out .= $GLOBALS['LANG']->sL(\TYPO3\CMS\Backend\Utility\BackendUtility::getItemLabel('tt_content', 'select_key'), 1) . ' ' . $row['select_key'] . '<br />';
                                } else {