TypeError: we_megamenu_help(): Argument #2 ($route_match) must be of type RouteMatchInterface, Drupal\Core\Routing\CurrentRouteMatch given

Created on 29 May 2023, over 1 year ago
Updated 30 May 2023, over 1 year ago

Problem/Motivation

Upon downloading and enabling the dev module, an error message is encountered while trying to access the admin/reports/status page. The error is related to the function `we_megamenu_help()` and specifically states that Argument #2 ($route_match) should be of type RouteMatchInterface, but Drupal\Core\Routing\CurrentRouteMatch is provided instead.

Steps to reproduce

1. Download and enable the module composer require 'drupal/we_megamenu:1.x-dev@dev'.
2. Access the admin/reports/status page.

Proposed resolution

To resolve this issue, the `we_megamenu_help()` function in the we_megamenu.module file should be modified to accept the correct argument type (RouteMatchInterface) and handle it appropriately.

Remaining tasks

Provide patch!

User interface changes

There are no specific user interface changes associated with this error. The proposed resolution focuses on modifying the function in the backend to fix the error.

API changes

No API changes are required for resolving this error. The modification will be limited to the `we_megamenu_help()` function within the we_megamenu.module file.

Data model changes

There are no data model changes associated with this error. The proposed resolution focuses on modifying the function in the backend to fix the error.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rishi kulshreshtha

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

Comments & Activities

Production build 0.71.5 2024