Skip to content

Unreplaced variables in page metadata #27

Description

@SomeBdyElse

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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