From b882743d4e9c185a8758f3d866261e25e180df84 Mon Sep 17 00:00:00 2001 From: RomainLvr Date: Mon, 13 Apr 2026 11:19:27 +0200 Subject: [PATCH 1/2] Fix - Avoid SQL warning when no user session is active during plugin init --- inc/questiontype.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/questiontype.class.php b/inc/questiontype.class.php index 1a8e0b6b..1cd7d63f 100644 --- a/inc/questiontype.class.php +++ b/inc/questiontype.class.php @@ -380,7 +380,7 @@ private function getAvailableBlocks(): array $field_container = new PluginFieldsContainer(); $available_blocks = []; - $entity_restrict = isCommandLine() ? [] : getEntitiesRestrictCriteria(PluginFieldsContainer::getTable(), '', '', true); + $entity_restrict = (isCommandLine() || !Session::getLoginUserID()) ? [] : getEntitiesRestrictCriteria(PluginFieldsContainer::getTable(), '', '', true); $result = $field_container->find([ 'is_active' => 1, 'type' => 'dom', From ecf1c25d3046295fc0b4195fe674fb772da36660 Mon Sep 17 00:00:00 2001 From: RomainLvr Date: Mon, 13 Apr 2026 11:21:16 +0200 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1418224..3193f59b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed +- Fix SQL warning when no user session is active during plugin init - Fix error when submitting a form with an hidden question of type `Field` - Fixed a bug where a field was deleted when at least one question in a form was linked to another field