Incompatible with Menu Condition module or similar code

Created on 1 March 2022, almost 3 years ago
Updated 8 January 2024, 12 months ago

Problem/Motivation

The Context module alters the menu.active_trail service in order to provide the menu context reaction. Unfortunately, this leads to a recursive spiral of death if there is a Condition plugin that uses the menu.active_trail service. The contrib Menu Condition module provides such a Condition. Using a Menu Condition plugin to define a Context section results in a WSOD. I was also trying to use a custom Condition plugin that used the menu.active_trail service and got the same WSOD.

Steps to reproduce

1. Enable menu_condition and use the Menu Position condition it provides as a condition in a Context

2. Save
3. WSOD

Here's the call stack which shows the infinite recursion.

Proposed resolution

Good question! I might end up posting a patch that gets rid of the menu context reaction and the alteration to menu.active_trail because it's more important for my project that this module is compatible with Menu Condition.

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

🐛 Bug report
Status

Needs review

Version

5.0

Component

Code

Created by

🇺🇸United States danflanagan8 St. Louis, US

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

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