TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, class Drupal\dxpr_builder\Menu\MenuActiveTrailOverride does not have a method "setPathValidator"

Created on 3 June 2025, 5 months ago

Updating Menu trail by path to latest version in Drupal 11 breaks my site with a error related to DXPR

TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, class Drupal\dxpr_builder\Menu\MenuActiveTrailOverride does not have a method "setPathValidator"

🐛 Bug report
Status

Active

Version

2.7

Component

Code

Created by

🇨🇦Canada kiwad

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

Comments & Activities

  • Issue created by @kiwad
  • 🇧🇦Bosnia and Herzegovina drale01 Sarajevo

    I've created a patch that adds the missing setter methods to MenuActiveTrailOverride class for compatibility with Menu trail by path module in Drupal 11.

    The patch adds:
    - setPathValidator() method
    - setRequestContext() method
    - setLanguageManager() method
    - setConfigFactory() method

    This resolves the TypeError that occurs when both modules are enabled together.

    Tested with:
    - Drupal 11.0.1
    - DXPR Builder 2.7.5 and 3.x
    - Menu trail by path 2.2.0

    The patch is backward compatible and doesn't break existing functionality.

Production build 0.71.5 2024