Skip to content

Commit

Permalink
Fixed #14809
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Apr 15, 2024
1 parent 0a27be8 commit 313f2da
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Fixed a PHP error that could occur on the Dashboard if any Quick Post widgets hadn’t been saved since before Craft 1.2. ([#14794](https://github.com/craftcms/cms/issues/14794))
- Fixed a bug where double-clicking on an inline Matrix block tab would cause it to expand/collapse. ([#14791](https://github.com/craftcms/cms/issues/14791))
- Fixed a bug where site breadcrumbs weren’t getting hyperlinked for installs with multiple site groups. ([#14802](https://github.com/craftcms/cms/issues/14802))
- Fixed a bug where element conditions were allowing custom field condition rules to be selected multiple times. ([#14809](https://github.com/craftcms/cms/issues/14809))

## 5.0.4 - 2024-04-10

Expand Down
4 changes: 4 additions & 0 deletions src/base/conditions/BaseCondition.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ public function setConditionRules(array $rules): void
$rule->setCondition($this);
}
}

// Clear out our cache of selectable condition rules, in case any additional rules will depend on which
// rules are already configured.
$this->_selectableConditionRules = null;
}

/**
Expand Down
8 changes: 7 additions & 1 deletion src/fields/conditions/FieldConditionRuleTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,13 @@ public function getLabelHint(): ?string
*/
public function getExclusiveQueryParams(): array
{
return [];
$params = [];

foreach ($this->fieldInstances() as $field) {
$params[] = $field->handle;
}

return array_values(array_unique($params));
}

/**
Expand Down

0 comments on commit 313f2da

Please sign in to comment.