error drupal_get_path on htools_theme_registry_alter

Created on 26 September 2023, 9 months ago
Updated 11 April 2024, 3 months ago

Hello good,

I just set up drupal 10, I have installed version 3.x-dev and I get this error:

Error: Call to undefined function drupal_get_path() in htools_theme_registry_alter() (line 126 of modules/contrib/htools/htools.module).

🐛 Bug report
Status

RTBC

Version

3.0

Component

Code

Created by

🇪🇸Spain Carlos Romero

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

Comments & Activities

  • Issue created by @Carlos Romero
  • @carlos-romero opened merge request.
  • @carlos-romero opened merge request.
  • First commit to issue fork.
  • The error is occuring because drupal_get_path() function was used in Drupal 7 and earlier versions but it is not available in Drupal 8 and later.
    In Drupal 8 or later versions we can use the \Drupal::moduleHandler()->getModule() method to get the path of a module.Using that the error was resolved.

  • Status changed to Needs review 9 months ago
  • Status changed to RTBC 3 months ago
  • 🇮🇳India manish-31

    I have reviewed MR #23 looks good to me.

    The error does not occur after applying the MR #23 patch. Marking RTBC.

Production build 0.69.0 2024