Brokes hook implementations, specifically with Metatag

Created on 27 January 2023, about 2 years ago

Problem/Motivation

After implementing the module, the when using tokens in the metatag module, the tokens aren't converted. After tracing the issue, when the user views a page, it attempts to convert the metatag tokens twice (unsure exactly why). The first time the token is converted correct. The second time during the execution the token is not properly replaced. This also happens on subsequent page views indicating that there was some cache affecting the tokens. It seemed that while having this module enabled, the `hook_tokens` implementations wouldn't load the `field_tokens` hook after the cache is set (first execution).

I'm not entirely sure if this is isolated to my setup, but in case anyone has a similar issue, hopefully this will help.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States pookmish

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

Comments & Activities

  • Issue created by @pookmish
  • πŸ‡ΊπŸ‡ΈUnited States pookmish

    This patch just moves the config fetching outside of the constructor. This seemed to fix my issue but retain all the functionality of the module. Also it would prevent any issues if core changes its constructor of the service.

  • Status changed to Postponed: needs info 6 months ago
  • πŸ‡¦πŸ‡ΊAustralia nterbogt

    Is this still an issue? Can you confirm whether the fix recommended by pookmish solves the problem?

Production build 0.71.5 2024