In #2339151: Conditions / context system does not allow for multiple configurable contexts, eg. language types 162.2 alexpott points out that ContextAwarePluginAssignmentTrait::addContextAssignmentElement() gets ContextDefinitions from Plugins and passes them to ContextHandler:: getMatchingContexts() but plugins return Component ContextDefinitions and the ContextHandler expects Core ContextDefinitions. This is a very subtile observation on his part and we need to solve the docs here for the IDEs.

We used to have separate ContextAwarePluginInterfaces for Core and Component. An effort was made to merge these together, but alex's observation puts me back into the "we need a split" camp. We can do this pretty minimally though, so I'll provide a patch to that effect. Tim Plunkett and I discussed this at length and are on the same page with just provided the most minimal interface extension possible specific to this problem.

Eclipse

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

EclipseGc’s picture

Status: Active » Needs review
FileSize
2.1 KB

Something like so... ish

Eclipse

Status: Needs review » Needs work

The last submitted patch, 1: 2378583-1.patch, failed testing.

tim.plunkett’s picture

Status: Needs work » Needs review
FileSize
5.39 KB
3.29 KB

There are a couple other places that need this swap.

Status: Needs review » Needs work

The last submitted patch, 3: 2378583-context-3.patch, failed testing.

tim.plunkett’s picture

Status: Needs work » Needs review
FileSize
7.76 KB
1 KB
EclipseGc’s picture

Status: Needs review » Reviewed & tested by the community

I feel comfortable RTBCing this since there's no actual logic changes introduced and this is purely documentation in nature.

Eclipse

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 0d72036 and pushed to 8.0.x. Thanks!

  • alexpott committed 0d72036 on
    Issue #2378583 by tim.plunkett, EclipseGc: Core ContextAware Plugins...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.