Drupal\purge\Plugin\Purge\Invalidation\Exception\TypeUnsupportedException: path in Drupal\purge\Plugin\Purge\Invalidation\InvalidationsService->get() (line 84 of modules/contrib/purge/src/Plugin/Purge/Invalidation/InvalidationsService.php).

Created on 27 February 2025, about 2 months ago

Problem/Motivation

Trying to use path based invalidation does not work even though the readme says you can do that:

  $purgeInvalidationFactory = \Drupal::service('purge.invalidation.factory');
  $purgeQueuers = \Drupal::service('purge.queuers');
  $purgeQueue = \Drupal::service('purge.queue');

  $queuer = $purgeQueuers->get('myqueuer');
  $invalidations = [
    $purgeInvalidationFactory->get('path', 'contact'),
  ];

trying to do so throws the exception:

Drupal\purge\Plugin\Purge\Invalidation\Exception\TypeUnsupportedException: path in Drupal\purge\Plugin\Purge\Invalidation\InvalidationsService->get() (line 84 of modules/contrib/purge/src/Plugin/Purge/Invalidation/InvalidationsService.php).

πŸ› Bug report
Status

Active

Version

3.6

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kevinquillen

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

Comments & Activities

Production build 0.71.5 2024