#106047page.meta.whatever does not slide to parent
Description
Before TYPO3 13.2 (refer to https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.2/Deprecation-103752-ObsoleteGLOBALSTYPO3_CONF_VARSFEaddRootLineFields.html) it had been easy to preset metadata in the setup by using something like
page.meta {
author = TYPO3-stupid
author.data. = levelfield:-1, author, slide
description = Eine TYPO3-Seite
description.data = levelfield:-1, abstract, slide
keywords = These are the keywords.
keywords.data = levelfield:-1, keywords, slide
}
and using $GLOBALS[‘TYPO3_CONF_VARS’][‘FE’][‘addRootLineFields’]
In contrast to the documentation https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/Configuration/Typo3ConfVars/FE.html#confval-typo3-conf-vars-fe-addrootlinefields,
the meta data don’t show up. Without .data = levelfield:-1, abstract, slide the meta is used, but not replaced with content made in the backend.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 1
-
Benni Mack commented and changed status
NewClosed <span data-processor="relativetime" data-value="2025-03-23T20:07:24+00:00" > 03/23/25, 20:07 </span>
Hey wini2,
very interesting…
I suggest the proper code is:
page.meta { author.data = levelfield:-1, author, slide author.ifEmpty = TYPO3-stupid description.data = levelfield:-1, abstract, slide description.ifEmpty = Eine TYPO3-Seite keywords.data = levelfield:-1, keywords, slide keywords.ifEmpty = These are the keywords. }tbh, the previous code of yours was working by accident, as data should always override the previous behavior.
The TypoScript above from myself will work from TYPO3 4.0 – 14.0 :)
Hope this helped. If you need more assistance let me know!