From abed2f29391fbc70d3e5c8d6de84b2da51473cbf Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Thu, 16 Jan 2025 17:30:26 +0100 Subject: [PATCH] Fix allowed properties for Twig v3.14.1+ --- Module.php | 14 +++++++++++++- docs/CHANGELOG.md | 4 ++++ module.json | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Module.php b/Module.php index 17f7a8e5..06bd72c1 100644 --- a/Module.php +++ b/Module.php @@ -9,6 +9,8 @@ use humhub\modules\custom_pages\models\ContainerPage; use humhub\modules\custom_pages\models\Page; use humhub\modules\custom_pages\models\Snippet; +use humhub\modules\custom_pages\modules\template\models\AssetVariable; +use humhub\modules\custom_pages\modules\template\models\OwnerContentVariable; use humhub\modules\space\models\Space; use Yii; @@ -38,7 +40,17 @@ class Module extends ContentContainerModule 'allowedMethods' => [ 'humhub\modules\custom_pages\modules\template\models\OwnerContentVariable' => '__toString', ], - 'allowedProperties' => ['sidebar_container', 'content', 'sidebar_container'], + 'allowedProperties' => [ + OwnerContentVariable::class => [ + 'content', + 'emptyContent', + 'empty', + ], + AssetVariable::class => [ + 'bgImage1.jpg', + 'bgImage2.jpg', + ], + ], ]; public function checkOldGlobalContent() diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 01716072..32a86961 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +1.10.13 (Unreleased) +-------------------------- +- Fix #374: Fix allowed properties for Twig v3.14.1+ + 1.10.12 (January 16, 2025) -------------------------- - Enh #353: Reduce translation message categories diff --git a/module.json b/module.json index 2bad8d1e..9d92f045 100644 --- a/module.json +++ b/module.json @@ -3,7 +3,7 @@ "name": "Custom Pages", "description": "Create custom pages and widgets and share them with your users. Take advantage of a wide range of editing options, including HTML and Markdown.", "keywords": ["pages", "custom", "iframe", "markdown", "link", "navigation", "spaces"], - "version": "1.10.12", + "version": "1.10.13", "homepage": "https://github.com/humhub/custom-pages", "humhub": { "minVersion": "1.16"