The module overrides title changes made alter hooks from other modules

Created on 18 October 2021, about 3 years ago
Updated 5 April 2024, 9 months ago

Problem/Motivation

When the title is updated by other modules, the module overrides these changes in html_title_preprocess_page_title hook.

Steps to reproduce

1 Create any node with any title (For example: Test title)
2 Implement any hook which can alter the original title. For example: hook_ENTITY_TYPE_view_alter.

/**
 * Implements hook_ENTITY_TYPE_view_alter().
 */
function hook_node_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
  $build['title'][0]['#context']['value'] .=  ' (UPDATED)';
}

Expected title result: "Test title (UPDATED)"
Actual title result: "Test title"

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States xopoc

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024