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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drupal-contextdefinition_bc_fix-2999031-2-D8.patch | 707 bytes | andyf |
Comments
Comment #2
andyf commentedSo 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!
Comment #4
andyf commentedTest failure I think caused by #2887134: Convert web tests to browser tests for taxonomy module Part -2 - see #2887134-34: Convert web tests to browser tests for taxonomy module Part -2.
Comment #5
andyf commentedActually 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.