HelpController - error with system_get_module_admin_tasks

Created on 4 September 2024, 7 months ago
Updated 20 September 2024, 7 months ago

Hello

When i go in /admin/modal/help, I get this error

TypeError : Drupal\user\ModulePermissionsLinkHelper::getModulePermissionsLink(): Argument #2 ($name) must be of type string, array given, called in core/modules/system/system.module on line 993 dans Drupal\user\ModulePermissionsLinkHelper->getModulePermissionsLink() (ligne 47 de /core/modules/user/src/ModulePermissionsLinkHelper.php).

The trace

#0 core/modules/system/system.module(993): Drupal\user\ModulePermissionsLinkHelper->getModulePermissionsLink()
#1 /modules/contrib/modal_page/src/Controller/ModalHelpController.php(84): system_get_module_admin_tasks()
#2 [internal function]: Drupal\modal_page\Controller\ModalHelpController->index()

To resolve the error, in ModalHelpController.php, I change the line 81
$adminTasks = system_get_module_admin_tasks($projectMachineName, $this->extensionListModule->getExtensionInfo($projectMachineName));

By
$admin_tasks = \Drupal::service('system.module_admin_links_helper')->getModuleAdminLinks($projectMachineName);

I think the function system_get_module_admin_tasks is deprecated
https://www.drupal.org/node/3038972

🐛 Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

🇧🇪Belgium philalawst

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

Comments & Activities

Production build 0.71.5 2024