Hi,

I'm looking into an issue with adding page selection criteria to a page manager-overridden node view page: #2998462: Error adding Content Type Selection criteria or Context. In short there's an exception if you try to add a node condition. Tracing through, the issue seems to come from a call to \Drupal\Core\Plugin\Context\EntityContextDefinition::setConstraint() from \Drupal\Core\Plugin\Context\ContextDefinition::setConstraints(). It involves a BC layer that was added in #2986033: [regression] The BC layer for EntityContextDefinition in ContextDefinition is incomplete, and it looks like it's a simple mistake in the name of the method to call. Certainly changing the call to setConstraints($constraints) seems to fix the page manager issue for me.

Thanks

Comments

AndyF created an issue. See original summary.

andyf’s picture

Status: Active » Needs review
StatusFileSize
new707 bytes

So this seems to work for me, but I'm not familiar with the code. If someone who knows can confirm it's ok, I'm happy to look at adding a regression test.

Thanks!

Status: Needs review » Needs work

The last submitted patch, 2: drupal-contextdefinition_bc_fix-2999031-2-D8.patch, failed testing. View results

andyf’s picture

andyf’s picture

Status: Needs review » Closed (duplicate)

Actually I'm not sure I should've created a new issue - marking as duplicate of #2998462: Error adding Content Type Selection criteria or Context and moving that into core.