Postoffice compat theme suggestions incompatible with OOP hooks

Created on 14 April 2025, 19 days ago

Problem/Motivation

Postoffice ships with several subextensions. Two of them seem to have an unfortunate name clash, which only surfaces under 11.1 and later (i.e., after the introduction of a href=" https://www.drupal.org/node/3442349 ">OOP hooks).

The module postoffice_compat defines theme suggestion hooks. E.g.:

/**
 * Implements hook_theme_suggestions_HOOK() for postoffice_compat_email_user.
 */
function postoffice_compat_theme_suggestions_postoffice_compat_email_user(array $variables) {

However, the new OOP hook discovery code attributes those functions to postoffice_compat_theme (longest common prefix) and thinks that the hook name is suggestions_postoffice_compat_email_user instead of theme_suggestions_postoffice_compat_email_user.

Steps to reproduce

Proposed resolution

Turn hook implementations into OOP hooks and add a compatibility shim (see CR .

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.2

Component

Code

Created by

🇨🇭Switzerland znerol

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