If purge_queuer_coretags.settings config object is missing or null, purging does not happen

Created on 7 June 2018, about 6 years ago
Updated 28 September 2023, 9 months ago

This is caused by this line in \Drupal\purge_queuer_coretags\CacheTagsQueuer::initialize():

        $this->blacklistedTagPrefixes = $this->container
          ->get('config.factory')
          ->get('purge_queuer_coretags.settings')
          ->get('blacklist');

        // Make sure to disable ourselves during module installation.
        if (!is_array($this->blacklistedTagPrefixes)) {     ### HERE HERE HERE
          $this->queuer = FALSE;
          return FALSE;
        }

For an site where we did not have any configuration (not even an empty array) for the blacklist, this triggered the purging from not ever happening. So if you have this:

$ drush cget purge_queuer_coretags.settings
 [error]  Config purge_queuer_coretags.settings does not exist 

... then purging won't work.

Going to /admin/config/development/performance/purge and adding a blacklist tag under "Core Tags queuer > Configure" then made purging work again.

So, perhaps this idea of "Make sure to disable ourselves during module installation" mentioned in the comment in the above piece of code, seems to be trying to use the "lack of configuration" as a sign "the module is not installed yet"... but is the very thing that needs fixing.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States janusman

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

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.69.0 2024