#109584Exception in Layout-Module, when record has no TCA-config
Description
If (old) records without TCA-configurations on a page, Layout-Module throws Exception.
Stack trace:
#1661540376 TYPO3\CMS\Core\Schema\Exception\UndefinedSchemaException
No TCA schema exists for the name "tt_content.mask_linkbox".
in vendor/typo3/cms-core/Classes/Schema/SchemaCollection.php line 76
at TYPO3\CMS\Core\Schema\SchemaCollection -> get ('tt_content.mask_linkbox' )
in vendor/typo3/cms-core/Classes/Schema/TcaSchemaFactory.php line 58
at TYPO3\CMS\Core\Schema\TcaSchemaFactory -> get ('tt_content.mask_linkbox' )
in vendor/typo3/cms-backend/Classes/Preview/RecordFieldPreviewProcessor.php line 104
at TYPO3\CMS\Backend\Preview\RecordFieldPreviewProcessor -> prepareText (object(TYPO3\CMS\Core\Domain\RawRecord), 'header' )
in vendor/typo3/cms-backend/Classes/Preview/StandardContentPreviewRenderer.php line 110
at TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer -> renderPageModulePreviewHeader (object(TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem) )
in vendor/typo3/cms-backend/Classes/View/BackendLayout/Grid/GridColumnItem.php line 81
at TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem -> getPreview ( )
in vendor/typo3fluid/fluid/src/Core/Variables/StandardVariableProvider.php line 132
at TYPO3Fluid\Fluid\Core\Variables\StandardVariableProvider -> getByPath ('item.preview' )
Possible patch
diff --git a/typo3/sysext/backend/Classes/Preview/StandardContentPreviewRenderer.php b/typo3/sysext/backend/Classes/Preview/StandardContentPreviewRenderer.php
index c5bfea5e38..38022e8a27 100644
--- a/typo3/sysext/backend/Classes/Preview/StandardContentPreviewRenderer.php
+++ b/typo3/sysext/backend/Classes/Preview/StandardContentPreviewRenderer.php
@@ -91,7 +91,9 @@ class StandardContentPreviewRenderer implements PreviewRendererInterface, Logger
$request = $item->getContext()->getCurrentRequest();
$schema = $this->tcaSchemaFactory->get($item->getTable());
$outHeader = '';
-
+ if (!$this->tcaSchemaFactory->has($record->getFullType())) {
+ return $outHeader;
+ }
if ($record->has('header_layout')) {
$headerLayout = (string)$record->get('header_layout');
if ($headerLayout === '100') {Reviews 1
History 48
-
Garvin Hicking commented and changed status
NewNeeds Feedback 04/15/26, 10:33 -
Gerrit Code Review pushed patch set 1 for main to change 93678 status
Needs FeedbackUnder Review 04/15/26, 11:17 -
Andreas Häfner commented 04/15/26, 11:19
Done so @ghi
-
Gerrit Code Review pushed patch set 2 for main to change 93678 04/16/26, 06:27
-
Gerrit Code Review pushed patch set 3 for main to change 93678 04/16/26, 06:38
-
Gerrit Code Review pushed patch set 4 for main to change 93678 04/16/26, 09:11
-
Andreas Häfner commented and changed status
Under ReviewResolved done0 %100 % 04/17/26, 06:10Applied in changeset commit:01efc4c2b8642aea451f9b6b4b78fe28936c0548.
-
Benni Mack changed status
ResolvedClosed 04/21/26, 11:30
That sounds useful, would you like to contribute your patch to oure review.typo3.org system?