Browse Source
always saves to the block and fails to evaluate to false. It should not save if
no value has been specified for term URI.
Found the following in `web/core/lib/Drupal/Core/Condition/ConditionPluginCollection.php`.
```php
// In order to determine if a plugin is configured, we must compare it to
// its default configuration. The default configuration of a plugin does
// not contain context_mapping and it is not used when the plugin is not
// configured, so remove the context_mapping from the instance config to
// compare the remaining values.
unset($instance_config['context_mapping']);
if ($default_config === $instance_config) {
unset($configuration[$instance_id]);
}
```
When doing the comparison we have.
```php
$default_config = [
"id" => "node_has_term",
"logic" => "and",
"negate" => false
];
$instance_config = [
"id" => "node_has_term",
"logic" => "and",
"negate" => false,
"uri" => NULL,
];
```
So the comparison fails and the configuration is stored and evaluated later
causing issues since it fails to pass evaluation.
Hence we need to change the default config to match the submitted values.
pull/819/head
1 changed files with 4 additions and 1 deletions
Loading…
Reference in new issue