From a90725e80950871eaf257000548ccb1cd8ac0fd5 Mon Sep 17 00:00:00 2001 From: Helmut Hackbarth Date: Sun, 2 Jun 2024 19:59:36 +0200 Subject: [PATCH] Bugfix release v5.3.12 --- Classes/Controller/AbstractController.php | 1 + Classes/Controller/ConfigController.php | 6 +++++ Classes/DataProcessing/ConfigProcessor.php | 22 +++++++------------ Classes/Helper/GalleryHelper.php | 2 +- Configuration/TypoScript/constants.typoscript | 3 +++ Configuration/TypoScript/setup.typoscript | 1 + .../Partials/Content/Swiper/Default.html | 4 ++-- ext_emconf.php | 6 ++--- 8 files changed, 25 insertions(+), 20 deletions(-) diff --git a/Classes/Controller/AbstractController.php b/Classes/Controller/AbstractController.php index b75ae9b1..1c84721e 100644 --- a/Classes/Controller/AbstractController.php +++ b/Classes/Controller/AbstractController.php @@ -37,6 +37,7 @@ abstract class AbstractController extends ActionController protected $rootConfig; protected $rootTemplates; protected $persistenceManager; + protected $countRootTemplates; /** diff --git a/Classes/Controller/ConfigController.php b/Classes/Controller/ConfigController.php index 9a00882f..ef1a7a8c 100644 --- a/Classes/Controller/ConfigController.php +++ b/Classes/Controller/ConfigController.php @@ -18,6 +18,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\RootlineUtility; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; +use TYPO3\CMS\Extbase\Service\CacheService; /* * This file is part of the TYPO3 extension t3sbootstrap. @@ -232,6 +233,11 @@ public function updateAction(Config $config): ResponseInterface $config->setHomepageUid($this->rootPageId); $this->configRepository->update($config); parent::writeConstants(); + if (!empty($this->settings['clearPageCache'])) { + $cacheService = GeneralUtility::makeInstance(CacheService::class); + $cacheService->clearPageCache(); + } + return $this->redirect('edit', null, null, array('config' => $config, 'updated' => true)); } diff --git a/Classes/DataProcessing/ConfigProcessor.php b/Classes/DataProcessing/ConfigProcessor.php index 8325baeb..65dc7119 100644 --- a/Classes/DataProcessing/ConfigProcessor.php +++ b/Classes/DataProcessing/ConfigProcessor.php @@ -237,12 +237,9 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu ? $processedRecordVariables['navbarImage'] : $contentObjectConfiguration['settings.']['navbar.']['image.']['defaultPath']; // container - if (!$processedRecordVariables['navbarContainer']) { - $processedData['config']['navbar']['container'] = ''; - } else { - $processedData['config']['navbar']['containerposition'] = $processedRecordVariables['navbarContainer']; - $processedData['config']['navbar']['container'] = 'container'; - } + $processedData['config']['navbar']['container'] = !empty($processedRecordVariables['navbarContainer']) + ? $processedRecordVariables['navbarContainer'] : ''; + // inner container is required $processedData['config']['navbar']['innercontainer'] = $processedRecordVariables['navbarInnercontainer'] ?: 'container'; // brand @@ -311,19 +308,16 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu $navBarAttr .= ' data-colorschemes="'.$navbarColor.'"'; $navBarAttr .= ' data-color="navbar-'.$processedRecordVariables['navbarEnable'].'"'; } - - // sticky-top - if ($processedRecordVariables['navbarPlacement'] === 'sticky-top') { - $navBarAttr .= ' data-bs-toggle="sticky-onscroll"'; - } $processedData['config']['navbar']['dataAttr'] = $navBarAttr; // placement if ($processedRecordVariables['navbarPlacement']) { $processedData['config']['navbar']['placement'] = $processedRecordVariables['navbarPlacement']; - if (!empty($processedData['config']['navbar']['containerposition']) && $processedData['config']['navbar']['containerposition'] == 'outside') { - $processedData['config']['navbar']['container'] = - trim($processedData['config']['navbar']['container'].' '.$processedRecordVariables['navbarPlacement']); + + // sticky-top & navbar container + if ($processedRecordVariables['navbarPlacement'] === 'sticky-top' + && !empty($processedData['config']['navbar']['container'])) { + $processedData['config']['navbar']['container'] = $processedData['config']['navbar']['container'].' sticky-top'; } else { $navbarClass .= ' '.$processedRecordVariables['navbarPlacement']; } diff --git a/Classes/Helper/GalleryHelper.php b/Classes/Helper/GalleryHelper.php index 8e44e0c2..02c77d6f 100644 --- a/Classes/Helper/GalleryHelper.php +++ b/Classes/Helper/GalleryHelper.php @@ -97,7 +97,7 @@ public function getGalleryClasses(array $processedData, string $breakpoint): arr $galleryClass = 'gallery imageorient-'.$processedData['data']['imageorient']; $galleryRowClass = ''; $imageorient = $processedData['data']['imageorient']; - $rowwidth = empty($processedData['rowwidth']) ? 0 : $processedData['rowwidth']; + $rowwidth = empty($processedData['rowwidth']) ? '' : $processedData['rowwidth']; // Above or below (0,1,2,8,9,10) if ( $imageorient < 11 ) { if ( $imageorient == 0 || $imageorient == 8 ) { diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index 60056a31..2b092b26 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -267,6 +267,9 @@ bootstrap.backToTopForAllPages = 0 # font-weights for Google fonts (regular == 400) bootstrap.gooleFontsWeights = 300, regular, 700 +# clears the cache when the config is saved +bootstrap.extconf.clearPageCache = 1 + # disable jQuery by default bootstrap.disable.jquery = 1 diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index e476c21c..36f547d9 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -30,6 +30,7 @@ module.tx_t3sbootstrap { breakpoint.xxl = {$bootstrap.navbar.breakpoint.xxl} disableJquery = {$bootstrap.disable.jquery} gooleFontsWeights = {$bootstrap.gooleFontsWeights} + clearPageCache = {$bootstrap.extconf.clearPageCache} cdn { // Versions enable = {$bootstrap.cdn.enable} diff --git a/Resources/Private/Partials/Content/Swiper/Default.html b/Resources/Private/Partials/Content/Swiper/Default.html index b41f280a..b404f09b 100644 --- a/Resources/Private/Partials/Content/Swiper/Default.html +++ b/Resources/Private/Partials/Content/Swiper/Default.html @@ -67,8 +67,8 @@ arguments="{ratio: '{ratio}', file: '{swiperSlides.{card.uid}.0}', width: '{width}', swiper: 'true', origImage: '{origImage}'}" /> - - + + diff --git a/ext_emconf.php b/ext_emconf.php index cd8d4c2e..4926d421 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -14,7 +14,7 @@ 'title' => 'Bootstrap Components', 'description' => 'Startup extension to use bootstrap 5 classes, components and more out of the box. Example and info: www.t3sbootstrap.de', 'category' => 'templates', - 'version' => '5.3.11', + 'version' => '5.3.12', 'state' => 'stable', 'author' => 'Helmut Hackbarth', 'author_email' => 'typo3@t3solution.de', @@ -25,8 +25,8 @@ [ 'php' => '8.1.0-8.2.99', 'typo3' => '12.4.12-12.4.99', - 'container' => '2.3.5-2.99.99', - 'content_defender' => '3.4.1-3.99.99' + 'container' => '2.3.6-2.99.99', + 'content_defender' => '3.4.2-3.99.99' ], 'conflicts' => [