Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion inc/questiontype.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Comment thread
RomainLvr marked this conversation as resolved.
Outdated
$result = $field_container->find([
'is_active' => 1,
'type' => 'dom',
Expand Down