- Issue created by @pascuperbla
When the widget context is modified, it is not reflected in the Entity Browser Context Widget, each time the context is saved a new key is generated . The Entity Browser Context Widget uses the first generated key, so subsequent changes are not found, as they are stored with other keys.
Steps:
1. Add a new filter in a hook_field_widget_form_alter in the widget context. For example: $element['entity_browser']['#widget_context']['filter'] = $value;
2. Create a contextual filter in the entity browser view, indicating that the default value is "Entity Browser Context" and with the "Context key" equal to the filter added in the previous step (in this case, "filter"). The applied contextual filter doesn't work.
Have a unique key for each widget context stored. Use the session ID, for example.
Active
2.13
Widget plugins