Problem/Motivation

When using the Flag module with the Purge module to purge external caches, unflagging an entity results in an EntityStorageException with the message "Tag invalidations cannot contain asterisks".

Steps to reproduce

- Install and configure the Flag module.
- Install and configure the Purge module.
- Create a flag on an entity.
- Flag the entity.
- Unflag the entity to get the storage exception.

As far as I can tell, the offending cache tag was introduced in https://www.drupal.org/node/3538393.

Issue fork flag-3557145

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

wulff created an issue. See original summary.

deaom made their first commit to this issue’s fork.

deaom’s picture

Version: 5.0.3 » 5.x-dev
Status: Active » Needs review

The asterisk in cache tag is considered as a literal string and its use is not recommended as its not used as a wildcard (the more you know). Removed the part in test that tests the asterisk as the tag is removed. Setting status to needs review.

  • ivnish committed 50fe4fcd on 5.x authored by wulff
    feat: #3557145 Flag cache tags result in Purge module exception
    
    By: @...
ivnish’s picture

Status: Needs review » Fixed

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

johan_vm’s picture

StatusFileSize
new1.77 KB

Adding a patch file to solve this issue in our project.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

sagesolutions’s picture

This is in the 5.x dev branch, but is missing in the latest 5.1 dev branch. Can this be added there too?

sagesolutions’s picture

Edit - nevermind. I was on the 5.0.3 branch which doesnt include this. The 5.1 branch does!

finn lewis’s picture

Hi folks!
Thanks so much for all your work on this.
Just testing the patch in #8 on the 5.0.3 release and it fixes the issue for me.
Any chance we could get a release of the 5.0 branch to address this?
The 5.1 releases are still beta, so we'd rather stick with the stable 5.0 branch for now.
Many thanks,
Finn