Missing purger error when module is enabled locally

Created on 19 June 2023, about 1 year ago

Problem/Motivation

When developing locally with the GovCMS purge module enabled, the following error is raised:

`[error] diagnostics: ERROR: Purgers: There is no purger loaded which means that you need a module enabled to provide a purger plugin to clear your external cache or CDN.`

Steps to reproduce

1. From a fresh version of Drupal 9+, install the module in the usual way via composer.
2. Run a `drush pm:enable govcms_akamai_purge`
3. Run a `drush pml` or visit the site status page

You should now be seeing the issue.

The problem seems to be with the conditions under which the module's ConfigOverrides are enabled. Essentially, we have the purge module running, but unless the conditions here are met, there is no registered purger.

Proposed resolution

One possibility would be to load the purger (effectively getting rid of the condition in the ConfigOverrides) and then checking for the existence of the "LOCAL_DEV=true" environment variable value in the purger itself. If that is present, we don't engage any actual purge process.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡ΏNew Zealand bomoko

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

Comments & Activities

  • Issue created by @bomoko
  • @bomoko opened merge request.
  • First commit to issue fork.
  • First commit to issue fork.
Production build 0.69.0 2024