Allow global to be disabled and not turn everything off

Created on 12 May 2025, 2 days ago

Problem/Motivation

In #2981793-11: Allow metatag configuration to be disabled β†’ @grayle wrote:

Added warning when disabling Global default that this will disable all Metatags, as there's an early return in the code and I didn't feel like changing that part was warranted in this issue.

Steps to reproduce

Disable the global metatag. miss the warning and get confused

Proposed resolution

Either remove the ability completely to disable the global metatag or change the code to make it work with global disabled.

If you don't want metatags uninstall the module. In my opinion you should be able to disable the global metatag defaults and only add metatags to entity types you want to.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

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

Comments & Activities

  • Issue created by @alexpott
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    In fact the whole way the global metatag object is loading and then changed using \Drupal\metatag\Entity\MetatagDefaults::overwriteTags is quite interesting. This will end up changing the cached config object in memory (if we turned on memory caching for metatag defaults config entities).

    I think we should try to tidy all of this up and allow the metatags system to work when the global defaults are disabled.

Production build 0.71.5 2024