Fix fatal error (undefined function drupal_get_path) in D10

Created on 20 December 2023, 11 months ago
Updated 11 August 2024, 3 months ago

Problem/Motivation

Vartheme can be installed in D10, but is not usable because of the fatal error on every page where the theme is used:

PHP Error: Call to undefined function drupal_get_path() in vartheme_preprocess_page() (line 31 of vartheme.theme).

I know this theme is minimally maintained, but we need it for a smooth upgrade to fresh Drupal core and Varbase.

Proposed resolution

Change to \Drupal::service('extension.list.theme')->getPath('vartheme')

Remaining tasks

  • βœ… File an issue about this project
  • βœ… Addition/Change/Update/Fix to this project
  • βœ… Testing to ensure no regression
  • βž– Automated unit/functional testing coverage
  • βž– Developer Documentation support on feature change/addition
  • βž– User Guide Documentation support on feature change/addition
  • βž– UX/UI designer responsibilities
  • βž– Accessibility and Readability
  • βœ… Code review from 1 Varbase core team member
  • βœ… Full testing and approval
  • βœ… Credit contributors
  • βœ… Review with the product owner
  • βœ… Update Release Notes and Update Helper on new feature change/addition
  • βœ… Release vartheme-8.x-6.13 β†’

Varbase update type

  • βœ… No Update
  • βž– Optional Update
  • βž– Forced Update
  • βž– Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

6.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine pingwin4eg Zaporizhia πŸ‡ΊπŸ‡¦

Live updates comments and jobs are added and updated live.
  • PHP 8.2

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024