Usage of removed/depracated 'drupal_get_path' function

Created on 20 January 2023, over 1 year ago

Problem/Motivation

Inside the FontAwesomeManager class, the drupal_get_path function is used, which is deprecated in Drupal 9 and removed in Drupal 10.

Steps to reproduce

  • Add a fontawesome field on any entity type
  • Create a new entity (the one with the fontawesome field) and fill the field
  • Try to save the entity

I tried this on a taxonomy term and a node and on both entity types I get the error:

Error: Call to undefined function Drupal\fontawesome\drupal_get_path() in Drupal\fontawesome\FontAwesomeManager->getMetadataFilepath() (line 304 of modules/contrib/fontawesome/src/FontAwesomeManager.php).

Proposed resolution

We should replace the drupal_get_path function with the extionsion.list.module service.

\Drupal::service('extension.list.module')->getPath('fontawesome')
πŸ› Bug report
Status

Closed: duplicate

Version

2.24

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands VoidE Kampen, The Netherlands

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.69.0 2024