\Drupal\page_manager\Entity\PageVariant::getContexts() returns context from both the page (parameters) an the variant (static). Page contexts take precedent (coming from the path), but the order of the returned contexts puts static contexts first. Although this doesn't make any difference for code using contexts, this can be confusing for UIs where it makes more sense for page parameters to be listed before static contexts.

I would suggest changing the order, but preserving the precedence.

CommentFileSizeAuthor
#2 fix_context_order-2691391-2.patch1.11 KBandrewbelcher

Comments

andrewbelcher created an issue. See original summary.

andrewbelcher’s picture

Assigned: andrewbelcher » Unassigned
Status: Active » Needs review
StatusFileSize
new1.11 KB

Here's a patch that fixes this, including updating the test.

eclipsegc’s picture

Status: Needs review » Fixed

Yup, looks better than my 3 reverses, and due diligence says it works. Tests look good, let's keep moving.

Eclipse

Status: Fixed » Closed (fixed)

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