Integrating with Menu Multilingual module

Created on 17 March 2018, almost 7 years ago
Updated 18 October 2023, about 1 year ago

Hi,

I'm trying to integrate this module with Menu Multilingual module which allows you to filter out menu items based on the current language vs. the language of the menu item. See #2950751: Integration with blocks provided by responsive_menu

The Menu Multilingual assumes that the menu block extends Drupal\system\Plugin\Block\SystemMenuBlock which extends Drupal\Core\Block\BlockBase.

The Toggle and Superfish blocks provided by responsive_menu do not extend SystemMenuBlock but BlockBase directly.

I tried to modify the Drupal\responsive_menu\Plugin\Block\Toggle block so that it would extend SystemMenuBlock. However, when I do that, I get a fatal error:

LogicException: No menu name provided for menu.active_trails cache context. in Drupal\Core\Cache\Context\MenuActiveTrailsCacheContext->getCacheableMetadata()

1. Are the any reasons why Drupal\responsive_menu\Plugin\Block\Toggle could not extend SystemMenuBlock instead of BlockBase?
2. If there are no reasons that prevent this, how could we work around the exception?

Cheers,
Markus

Feature request
Status

Fixed

Version

2.6

Component

Code

Created by

🇫🇮Finland masipila

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