Wrong theme hook suggestion?

Created on 15 August 2024, 4 months ago

Problem/Motivation

I'm currently reviewing the module's code for #3468193: [2.1.x] Entity Extra Field and saw these lines in the module file:

$base_suggestion = $bundle_id ? $original . '__' . $entity_type_id . '__' . $bundle_id : $original . '__' . $bundle_id;

Code-wise and logically, this doesn't make sense to me and I think the variables just got turned around.

  1. $bundle_id is more specific than $entity_type_id
  2. If $bundle_id is empty, it shouldn't be used

So I'm quite sure it should be

$base_suggestion = $bundle_id ? $original . '__' . $entity_type_id . '__' . $bundle_id : $original . '__' . $entity_type_id;

Steps to reproduce

Proposed resolution

See above

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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