Function drupal_get_path() is deprecated.

Created on 8 September 2023, about 1 year ago

Problem/Motivation

Getting error while installing the theme - Error: Call to undefined function drupal_get_path() in banking_zymphonies_theme_get_slider_content() (line 187 of /app/themes/bank_zymphonies_theme/banking_zymphonies_theme.theme).

Steps to reproduce

Install the theme and enable it.

Proposed resolution

\Drupal::service('extension.list.theme')->getPath('MYTHEME')

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

1.1

Component

Code

Created by

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

Comments & Activities

  • Issue created by @shweta__sharma
  • @shweta__sharma opened merge request.
  • Status changed to Needs review about 1 year ago
  • I have pushed the code for the same, please review it.
    Thanks

  • Status changed to Needs work about 1 year ago
  • Getting one more error after uploading an image in slider - Error: Call to undefined function file_create_url() in banking_zymphonies_theme_get_slider_content() (line 184 of /app/themes.

    This also has to be fixed.

  • Status changed to Needs review about 1 year ago
  • Fixed both of the error - drupal_get_path() and file_create_url() function. Please review.
    Thanks

Production build 0.71.5 2024