Skip to content
Snippets Groups Projects
Commit 2bf3fd7d authored by Mikael Meulle's avatar Mikael Meulle
Browse files

Issue #3485497: invalid context in ui_patterns_field_formatters from a view in...

Issue #3485497: invalid context in ui_patterns_field_formatters from a view in dependency calculation
parent d6c3638a
Branches
Tags
1 merge request!255Issue #3460784 by just_like_good_vibes, pdureau: Add a whitelist mechanism in...
Pipeline #329522 passed
......@@ -94,7 +94,7 @@ class ComponentRow extends Fields {
}
}
// Build ui patterns component form.
$form['ui_patterns'] = $this->componentSettingsForm($form, $form_state, $this->getViewRowsComponentSourceContexts());
$form['ui_patterns'] = $this->componentSettingsForm($form, $form_state, $this->getFullContext());
$form['ui_patterns']["#component_validation"] = FALSE;
}
......@@ -107,7 +107,7 @@ class ComponentRow extends Fields {
* {@inheritdoc}
*/
public function render($row) {
return $this->buildComponentRenderable($this->getComponentConfiguration()['component_id'], $this->getViewRowsComponentSourceContexts($row));
return $this->buildComponentRenderable($this->getComponentConfiguration()['component_id'], $this->getFullContext($row));
}
/**
......@@ -119,7 +119,7 @@ class ComponentRow extends Fields {
* @return array
* Source contexts.
*/
protected function getViewRowsComponentSourceContexts(mixed $row = NULL): array {
protected function getFullContext(mixed $row = NULL): array {
$context = $this->getComponentSourceContexts();
$entity = NULL;
$bundle = NULL;
......
......@@ -95,7 +95,7 @@ trait ViewsPluginUiPatternsTrait {
if (!$component_id) {
return $dependencies;
}
$component_dependencies = $this->calculateComponentDependencies($component_id, $this->getComponentSourceContexts());
$component_dependencies = $this->calculateComponentDependencies($component_id, $this->getFullContext());
SourcePluginBase::mergeConfigDependencies($dependencies, $component_dependencies);
SourcePluginBase::mergeConfigDependencies($dependencies, ["module" => ["ui_patterns_views"]]);
return $dependencies;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment