From 5f7bfce3c1ea3fcda48830a4aea197a300504ebc Mon Sep 17 00:00:00 2001 From: Benjamin Kott Date: Tue, 23 May 2023 08:52:33 +0200 Subject: [PATCH] [TASK] Make page type restriction removal for comments compatible with v12 --- Configuration/TCA/tx_blog_domain_model_comment.php | 3 +++ ext_tables.php | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Configuration/TCA/tx_blog_domain_model_comment.php b/Configuration/TCA/tx_blog_domain_model_comment.php index 5b97e344..78d8bbc1 100644 --- a/Configuration/TCA/tx_blog_domain_model_comment.php +++ b/Configuration/TCA/tx_blog_domain_model_comment.php @@ -31,6 +31,9 @@ 'default' => 'record-blog-comment' ], 'searchFields' => 'uid,comment,name,email', + 'security' => [ + 'ignorePageTypeRestriction' => true, + ], ], 'columns' => [ 'pid' => [ diff --git a/ext_tables.php b/ext_tables.php index 046f28d0..2fdc61d8 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -71,7 +71,9 @@ options.pageTree.doktypesToShowInNewPageDragArea := addToList(' . Constants::DOKTYPE_BLOG_POST . ') '); -ExtensionManagementUtility::allowTableOnStandardPages('tx_blog_domain_model_comment'); +if ((GeneralUtility::makeInstance(Typo3Version::class))->getMajorVersion() < 12) { + ExtensionManagementUtility::allowTableOnStandardPages('tx_blog_domain_model_comment'); +} if ((GeneralUtility::makeInstance(Typo3Version::class))->getMajorVersion() < 12) { // Main Blog