If field C depends on field B which in turn depends on field A and if field B is unavailable because of its dependencies on field A, field C's explicit dependencies on field B might have still be fulfilled even though field B is unavailable.
Instead of just checking the dependency, we must also check if the depending field fulfills its dependencies.
See #2509
public function checkDependencies() {
if (!empty($this->dependencies)) {
foreach ($this->dependencies as $dependency) {
- if (!$dependency->checkDependency()) {
+ // check dependencies directly and check if a dependent
+ // field itself is unavailable because of its dependencies
+ if (!$dependency->checkDependency() || !$dependency->getField()->checkDependencies()) {
return false;
}
}