drupal_get_path removed in Drupal 10

Created on 17 January 2024, 11 months ago
Updated 25 January 2024, 11 months ago

Problem/Motivation

`drupal_get_path` was removed in Drupal 10, replaced with `\Drupal::service('extension.path.resolver')->getPath` Use of the old function breaks functionality of this module in Drupal 10

Currently it is being used in /src/Controller/BrowserController.php:272

Steps to reproduce

Have thumbnails set, try to add block

Proposed resolution

the new service is adrop-in replacement

          $block["layout_builder_browser_data"]->image_path = \Drupal::service('extension.path.resolver')->getPath($baseinfo[0], $baseinfo[1]) . '/' . $block["layout_builder_browser_data"]->image_path;

Not sure if you need a null coalesce or anything.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Closed: cannot reproduce

Version

1.6

Component

Code

Created by

🇺🇸United States R_H-L

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

Comments & Activities

Production build 0.71.5 2024