Call to Drupal 10 removed function drupal_get_path() in help page

Created on 5 December 2023, 12 months ago
Updated 15 January 2024, 10 months ago

Problem/Motivation

Upon visiting the help page a php error is occuring. This is happening because drupal_get_path is depreciated and removed from Drupal 10

The website encountered an unexpected error. Please try again later.

Error: Call to undefined function drupal_get_path() in google_api_client_help() (line 14 of modules/contrib/google_api_client/google_api_client.module).

Steps to reproduce

Install the module in Drupal 10
Go to help page /admin/help/google_api_client (by clicking on the Help link in /admin/modules)

Proposed resolution

Replace drupal_get_path with \Drupal::service('extension.list.module')->getPath()

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

4.3

Component

Code

Created by

🇮🇳India sijumpk

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