Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Custom Element to Tags::IGNORE_TAGS_FROM_CLASSES #81

Open
BenParizek opened this issue Aug 9, 2024 · 0 comments
Open

Add Custom Element to Tags::IGNORE_TAGS_FROM_CLASSES #81

BenParizek opened this issue Aug 9, 2024 · 0 comments

Comments

@BenParizek
Copy link

We're looking to migrate a site to Servd Static Cache and the site currently uses Upper and Verbb's SuperTable. We ran into an issue with Upper where the Super Table block element (similar to the Matrix Block) was creating havoc with the cache busting and had to exclude it from the cache logic.

In looking at your code, it appears you exclude the User and MatrixBlock Elements:

const IGNORE_TAGS_FROM_CLASSES = [
'craft\elements\MatrixBlock',
'craft\elements\User'
];

But there doesn't appear to be an event where we can add additional custom Elements that may require the same treatment.

Could you add an event where we can add custom elements or hard code support for also ignoring the verbb\supertable\elements\SuperTableBlockElement custom Element Type? Currently, I think we'd have to fork the repo and include our patch version in our project directly. I'm open to other solutions I'm overlooking too.

As Super Table has been retired for Craft 5, this will no longer be an issue after Craft 4, but we'll need this on a Craft 4 site until we have a chance to upgrade to Craft 5.

@engram-design

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant