The remaining rule are ignored on missing context

Created on 31 March 2020, over 4 years ago
Updated 12 June 2024, 4 months ago

How to reproduce:

  1. Enable 2 themes, the first is the default theme and the second is enabled with rules
  2. Create a rule based on a node type
  3. Create a rule based on a existing page path (eg. <front>)
  4. Order the rules, so the node type rule is evaluated first

Result:

On the front page, we should get the second theme, however it is the first theme which is displayed.

This is because the applies method has a return statement on context miss, instead of a continue 2, so the rules after the one with missing contexts are totally ignored.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇱🇺Luxembourg B-Prod

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024