Skip to content

Commit

Permalink
Fix allowed properties for Twig v3.14.1+
Browse files Browse the repository at this point in the history
  • Loading branch information
yurabakhtin committed Jan 16, 2025
1 parent 4d99918 commit abed2f2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
14 changes: 13 additions & 1 deletion Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit abed2f2

Please sign in to comment.