Macro "menu_links" is not defined in template

Created on 1 February 2023, almost 2 years ago
Updated 22 February 2024, 9 months ago

Problem/Motivation

When enable the module and flush cache I got this error
Twig\Error\RuntimeError: Macro "menu_links" is not defined in template "themes/custom/hiscool/templates/menu-levels.html.twig". in twig_call_macro() (line 25 of /var/www/docroot/modules/contrib/menu_item_extras/templates/menu--extras.html.twig)

Steps to reproduce

Proposed resolution

The error from import function in menu--extras.html.twig file by adding @menu_item_extras before template name for the correct path
From
{% import "menu-levels.html.twig" as menu %}
To
{% import "@menu_item_extras/menu-levels.html.twig" as menu %}

Please review.

Thank you

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇹🇭Thailand bentino

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024