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

Unreplaced variables in page metadata #27

Open
SomeBdyElse opened this issue May 6, 2024 · 0 comments
Open

Unreplaced variables in page metadata #27

SomeBdyElse opened this issue May 6, 2024 · 0 comments

Comments

@SomeBdyElse
Copy link
Collaborator

SomeBdyElse commented May 6, 2024

If we use variables in fields like page.description or page.og_description on pages with uncached content objects, the markers will be replaced only if the pages are not served from cache. If the request is answered with cached content, the raw markers will be visible in the page content.

In these cases, the html source passed to ext variables' ContentProcessor::replaceContent does not contain the rendered page head, but markers such as ###META88b79195bfbc33513067fe02b89e7336###. As the markers are not in the source yet, they cannot be replaced.

Content passed to ContentProcessor::replaceContent:

<!DOCTYPE html>
<html dir="ltr" lang="de-CH" class="no-js" prefix="og: http://ogp.me/ns#">
<head><!-- ###TITLE88b79195bfbc33513067fe02b89e7336### -->
<!-- ###META88b79195bfbc33513067fe02b89e7336### -->

<!-- ###CSS_LIBS88b79195bfbc33513067fe02b89e7336### -->
<!-- ###CSS_INCLUDE88b79195bfbc33513067fe02b89e7336### -->
<!-- ###CSS_INLINE88b79195bfbc33513067fe02b89e7336### -->

<!-- ###JS_LIBS88b79195bfbc33513067fe02b89e7336### -->
<!-- ###JS_INCLUDE88b79195bfbc33513067fe02b89e7336### -->
<!-- ###JS_INLINE88b79195bfbc33513067fe02b89e7336### -->

<!-- ###HEADERDATA88b79195bfbc33513067fe02b89e7336### -->
</head>

I wonder conceptually if ext:variables is meant to replace variables in uncached parts of the page.

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