Skip to content

Replacement not done when another listener disables caching #39

@brotkrueml

Description

@brotkrueml

In the CacheableContentGeneratedEventListener it is checked if caching is enabled:

if (!$event->isCachingEnabled()) {
    return;
}

However, when EXT:yoast_seo is installed, the content is not replaced, as that extension provides a listener which sets caching to disabled when a specific HTTP header is set:

https://github.com/Yoast/Yoast-SEO-for-TYPO3/blob/main/Classes/Frontend/AfterCacheableContentIsGeneratedListener.php#L16

It seems this kicks in when logged-in in backend. Therefore, an editor cannot see the changes, as also the middleware (for non-cached content) does not kick in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions