#86956Typoscript meta tag field settings have no effect
Description
When defining meta tags with typoscript for example
page {
meta {
author = {$page.meta.author}
author {
override.field = author
}
}
}
the override value is not rendered in the frontend if it is set in the backend.
The frontend alway shows the value set in {$page.meta.author}.
Similar if you define a meta tag that takes it’s value directly from a database field e.g.
page {
meta {
author.field = author
}
}
The tag is not rendered in the frontend.
Using `page.meta.author.replace=1` doesn’t help either.
The only way i got the override to work is the following:
page.meta.author.override.field >
page.meta.author.override.data = DB:pages:{TSFE:id}:author
page.meta.author.override.data.insertData = 1
To me it seems like the parameter “field” isn’t working as expected.
Reviews 3
History 2326
Show 1 earlier messages
-
Richard Haeser commented and changed status
NewAccepted <span data-processor="relativetime" data-value="2018-11-20T15:08:20+00:00" > 11/20/18, 15:08 </span>
-
Vasyl Mosiychuk commented <span data-processor="relativetime" data-value="2018-12-03T21:37:43+00:00" > 12/03/18, 21:37 </span>
I can confirm this issue too…
My TYPO3 9.5.1, PHP 7.2
page { meta { author = {$page.meta.author} author { override.field = author } keywords = {$page.meta.keywords} keywords { override.field = keywords } } }…and it is not working
page { meta { author.data = author keywords.data = keywords } } page { meta { author.data = levelfield:-1, author, slide keywords.data = levelfield:-1, keywords, slide } }…very strange but it is working
page { meta { description = {$page.meta.description} description { override.field = description } } }…and it is working
page { meta { keywords.data = page:keywords author.data = page:author } } -
Vasyl Mosiychuk commented <span data-processor="relativetime" data-value="2018-12-06T15:41:43+00:00" > 12/06/18, 15:41 </span>
Tested on the TYPO3 v. 9.5.1 with Bootstrap Package 10.0.4 – working
page { meta { keywords = {$page.meta.keywords} keywords { stdWrap { override { data = page:keywords } } } author = {$page.meta.author} author { stdWrap { override { data = page:author } } } } } -
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2018-12-07T19:25:48+00:00" > 12/07/18, 19:25 </span>
These are my findings with TYPO3 9.5.2 (latest master)
- I created three constants
- on one page, I set the values of the fields author, keyword, descriptionThese three lines are always present on each test
page.meta.author = {$page.meta.author}>>> constant is shown
@page.meta.keywords = {$page.meta.keywords}>>> constant is shownpage.meta.description = {$page.meta.description}@ >>> Note: in this situation the description field of the page properties will be taken; if not empty!For each test, I added the following three lines (each time a different set of lines)
Test 1 – added:
page.meta.author.override.field = author>>> Does not work; the constant is shown
@page.meta.keywords.override.field = keywords@ >>> Does not work; the constant is shown
@page.meta.description.override.field = description@ >>>Works the field value is taken; but see the previous Note!Test 2 – added:
page.meta.author.data = author >>> *Does not work*; the tag is missingpage.meta.keywords.data = keywords >>> Does not work; the tag is missing
@page.meta.description.data = description >>> Works, but see the previous Note!Test 4 – added:
page.meta.author.data = page:author>>> Works the field value is taken; the tag is missing if empty
@page.meta.keywords.data = page:keywords@ >>> Works the field value is taken; the tag is missing if empty
@page.meta.description.data = page:description@ >>> Works the field value is taken; the tag is missing if emptyTest 5 – added:
page.meta.author.data = levelfield:-1, author, slide>>> Works the field value is taken; also the slide works
@page.meta.keywords.data = levelfield:-1, keywords, slide@ >>> Works the field value is taken; also the slide works
@page.meta.description.data = levelfield:-1, description, slide@ >>> Works the field value is taken; also the slide worksNOTE 2: in Install Tool, set
['FE']['addRootLineFields'] => 'author,description,keywords'Test 6 – added:
page.meta.author.override.data = page:author>>> Works the field value is taken; constant is shown if empty
@page.meta.keywords.override.data = page:keywords@ >>> Works the field value is taken; constant is shown if empty
@page.meta.description.override.data = page:description@ >>> Works the field value is taken; constant is shown if emptyTest 7 – added:
page.meta.author.stdWrap.override.data = page:author>>> Works the field value is taken; constant is shown if empty
@page.meta.keywords.stdWrap.override.data = page:keywords@ >>> Works the field value is taken; constant is shown if empty
@page.meta.description.stdWrap.override.data = page:description@ >>> Works the field value is taken; constant is shown if empty -
Richard Haeser commented and changed status
AcceptedNeeds Feedback <span data-processor="relativetime" data-value="2019-02-02T23:00:11+00:00" > 02/02/19, 23:00 </span>Can you check again? Can’t reproduce anymore. (Also not on 9.5.1…)
-
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2019-02-05T09:50:14+00:00" > 02/05/19, 09:50 </span>
@Richard Haeser I repeated the same tests with 9.5.4 and had slightly different results:
Test 1 -> same results
Test 2 -> one different result:
@page.meta.description.data = description@ >>> Value from field is taken if not empty; Tag is missing if empty
Test 4 -> same results
Test 5 -> all different results:
@page.meta.author.data = levelfield:-1, author, slide@ >>> Does not work; the tag is missing; also the slide works
@page.meta.keywords.data = levelfield:-1, keywords, slide@ >>> Does not work; the tag is missing; also the slide works
@page.meta.description.data = levelfield:-1, description, slide@ >>> Value from field is taken if not empty; Tag is missing if empty; also the slide works
Test 6 -> same results
Test 7 -> same resultsI cleared the frontend cache before each test.
-
Benjamin Eyring commented <span data-processor="relativetime" data-value="2019-04-04T18:31:02+00:00" > 04/04/19, 18:31 </span>
This issue still seems active in 9.5.5
As a workaround we solved it like this:
1. Deactivate rendering of the seo tags:
$GLOBALS[‘TYPO3_CONF_VARS’][‘SC_OPTIONS’][‘TYPO3\CMS\Frontend\Page\PageGenerator’][‘generateMetaTags’] = NULL;2. Set the fields to slide=true:
$GLOBALS[‘TYPO3_CONF_VARS’][‘FE’][‘addRootLineFields’] = ‘og_title,og_description,og_image,twitter_title,twitter_description,twitter_image,author,author_email’;3. Manually manage seo tags using TS:
70 = COA
70 { # OG:TITLE ###########################################
10 = TEXT
10 {
data = levelfield:-1, og_title, slide
noTrimWrap = |<meta property=“og:title” content=”|” />|
} # OG:TYPE ###########################################
20 = TEXT
20 {
value = website
noTrimWrap = |<meta property=“og:type” content=”|” />|
} # OG:URL #############################################
30 = TEXT
30 {
typolink {
parameter.data = tsfe:id
parameter.insertData = 1
useCacheHash = 1
addQueryString = 1
addQueryString.method = get
addQueryString.exclude = id
forceAbsoluteUrl = 1
returnLast = url
}
wrap = <meta property=“og:url” content=”|”>
} # OG:DESCRIPTION ######################################
40 = TEXT
40 {
data = levelfield:-1, og_description, slide
stdWrap.wrap = <meta property=“og:description” content=”|” />
} # OG:IMAGE ############################################ # Adaption for news see below
50 = FILES
50 {
references {
data = levelfield:-1, og_image, slide
}
renderObj = IMG_RESOURCE
renderObj {
file.import.data = file:current:publicUrl
}
stdWrap.dataWrap = <meta property=“og:image” content=”{site:base}|” />
required = 1
}
}TBD: Check, if these tags are set correctly for news detail pages.
Don’t know if there is a better solution?
-
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2019-07-06T19:24:40+00:00" > 07/06/19, 19:24 </span>
I repeated my tests (see comment 4) on 9.5.8 with a more rich scenario:
- I created three constants:
page.meta.author = AUTORE DA COSTANTE page.meta.keywords = KEYWORD DA COSTANTE page.meta.description = DESCRIPTION DA COSTANTE
- I created four pages
*Page A*
Author field: filled with AUTORE DA PAGINA
Keyword field: filled with KEYWORD DA PAGINA
Description field: filled with DESCRIPTION DA PAGINA*Page B*
Author field: empty
Keyword field: empty
Description field: filled with DESCRIPTION DA PAGINA*Page C*
Author field: filled with AUTORE DA PAGINA
Keyword field: filled with KEYWORD DA PAGINA
Description field: empty*Page D*
Author field: empty
Keyword field: empty
Description field: emptySo to sum up
Page A Page B Page C Page D Author filled [empty] filled [empty] Kewyord filled [empty] filled [empty] Description filled filled [empty] [empty] Note: for test 5 that involves the “slide” I created a subpage for each page; the fields on all the subpages are always empty;
on Install Tool I set
['FE']['addRootLineFields'] => 'author,description,keywords'- for each test, the lines:
page.meta.author = {$page.meta.author} page.meta.keywords = {$page.meta.keywords} page.meta.description = {$page.meta.description}are always present
- before each test, I cleared the cache
I sum up in the following table the results of all the tests;
legend:
for each cell of the table, I report the values taken for Author, Keywords and Description in this order;
“C” means that the value from the constants is taken; “P” means that the value from the page field is taken; “/” means that the tag is absent
|_. Test |_. Page A |_.Page B |_.Page C |_.Page D | | only
| C C P | C C P | C C C | C C C | |Added:
page.meta.author = {$page.meta.author}
page.meta.keywords = {$page.meta.keywords}
page.meta.description = {$page.meta.description}page.meta.author.override.field = author page.meta.keywords.override.field = keywords page.meta.description.override.field = description
|Added:
page.meta.author.data = author page.meta.keywords.data = keywords page.meta.description.data = description
|Added:
page.meta.author.data = page:author page.meta.keywords.data = page:keywords page.meta.description.data = page:description
|Added:
page.meta.author.data = levelfield:-1, author, slide page.meta.keywords.data = levelfield:-1, keywords, slide page.meta.description.data = levelfield:-1, description, slide
| same configuration of the previous line; checked the subpage of each page | P P P| / / P | P P / | / / / | |Added:
page.meta.author.override.data = page:author page.meta.keywords.override.data = page:keywords page.meta.description.override.data = page:description
|Added:
page.meta.author.stdWrap.override.data = page:author page.meta.keywords.stdWrap.override.data = page:keywords page.meta.description.stdWrap.override.data = page:description
From a first glance, the test with
page.meta.author.data = author page.meta.keywords.data = keywords page.meta.description.data = description
seems to present the most faulty behavior;
-
Richard Haeser changed status
Needs FeedbackNew <span data-processor="relativetime" data-value="2019-12-10T22:02:47+00:00" > 12/10/19, 22:02 </span> -
Benni Mack commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2020-03-23T17:00:25+00:00" > 03/23/20, 17:00 </span>Just to clear this up:
page.meta.author.data = author
page.meta.keywords.data = keywords
page.meta.description.data = descriptionThis would/should never ever work:
https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/DataTypes/Index.html#gettextWhen using .data – you need to have “page:author” or “field:author” (depending on the current data, which is correct in the case of page.meta).
Looking at your examples, Riccardo, the rest of the results look fine IMHO.
-
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2020-03-23T17:46:54+00:00" > 03/23/20, 17:46 </span>
Hello Benni, I report here again the results for each test for clarity, discarding the one with incorrect syntax:
1) This one still looks faulty , the value of description from the page is always taken even if I have just defined the constants.
Why only description behaves like that? Is it correct?Test Page A _.Page B _.Page C _.Page D only
page.meta.author = {$page.meta.author}
page.meta.keywords = {$page.meta.keywords}
page.meta.description = {$page.meta.description}C C P C C P C C C C C C 2) These ones look correct: the override with the values from page is always done when present – and they’re totally equivalent
|_. Test |_. Page A |_.Page B |_.Page C |_.Page D | |Added:
page.meta.author.override.field = author page.meta.keywords.override.field = keywords page.meta.description.override.field = description
|Added:
page.meta.author.override.data = page:author page.meta.keywords.override.data = page:keywords page.meta.description.override.data = page:description
|Added:
page.meta.author.stdWrap.override.data = page:author page.meta.keywords.stdWrap.override.data = page:keywords page.meta.description.stdWrap.override.data = page:description
3) This looks correct,too: only the values from the page are considered |Added:
page.meta.author.data = page:author page.meta.keywords.data = page:keywords page.meta.description.data = page:description
4) Last but not the least, this looks good, too, it is the same as the previous one, plus the “slide” is correctly considered
|_. Test |_. Page A |_.Page B |_.Page C |_.Page D | |Added:
page.meta.author.data = levelfield:-1, author, slide page.meta.keywords.data = levelfield:-1, keywords, slide page.meta.description.data = levelfield:-1, description, slide
same configuration of the previous line; checked the subpage of each page P P P / / P P P / / / / -
Benni Mack commented <span data-processor="relativetime" data-value="2020-03-23T17:53:12+00:00" > 03/23/20, 17:53 </span>
Perfect, Riccardo!
With your information I spotted the issue, which resides in the EXT:seo MetaTagGenerator where the “description” field is always taken from the page.
-
Benni Mack changed status
Needs FeedbackAccepted <span data-processor="relativetime" data-value="2020-03-23T17:53:19+00:00" > 03/23/20, 17:53 </span> -
Thomas Stranz commented <span data-processor="relativetime" data-value="2020-11-28T02:24:59+00:00" > 11/28/20, 02:24 </span>
page.meta.description.replace = 1worked for me
-
Richard Haeser commented <span data-processor="relativetime" data-value="2021-01-10T03:21:15+00:00" > 01/10/21, 03:21 </span>
For the description field it is right you need the
.replaceparameter. So this is expected behaviour. If you want to override the settings with TypoScript you have to use that parameter.If I’m right we can close this issue.
-
Richard Haeser changed status
AcceptedNeeds Feedback <span data-processor="relativetime" data-value="2021-01-10T03:21:26+00:00" > 01/10/21, 03:21 </span> -
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2021-01-10T08:55:57+00:00" > 01/10/21, 08:55 </span>
Thomas Stranz,Richard HaeserI am trying unluckily without success to find where in the documentation it is stated that
page.descriptionis a special case that needs thereplacefunction; (looking at https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/Setup/Page/Index.html?highlight=meta#meta. Is there some other place where to search?) -
Richard Haeser commented <span data-processor="relativetime" data-value="2021-01-31T07:30:35+00:00" > 01/31/21, 07:30 </span>
Riccardo, on the link you have given, in the description of meta you find:
> replace If set to 1, the tag will replace the one set earlier by a plugin. If set to 0 (default), the meta tag generated by the plugin will be used. If there is none yet, the one from TypoScript is set.
If that is not sufficient, maybe we have to update the documentation a little bit
-
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2021-01-31T09:29:44+00:00" > 01/31/21, 09:29 </span>
@Richard Haeser
Aw… it is embarrassing I haven’t seen it :O
> If that is not sufficient, maybe we have to update the documentation a little bit
I would suggest to add at least an example to make it more evident, and thanks again for finding it.
-
Richard Haeser changed status
Needs FeedbackNew <span data-processor="relativetime" data-value="2021-02-09T14:16:20+00:00" > 02/09/21, 14:16 </span> -
Clemens Riccabona commented <span data-processor="relativetime" data-value="2026-07-28T08:49:25+00:00" > 07/28/26, 08:49 </span>
Not sure if this should ever have worked,
but I still can confirm this does not work:page.meta.og:title.data = levelfield:-1, og_title, slide -
Gerrit Code Review pushed patch set 1 for main to change 94998 status
NewUnder Review <span data-processor="relativetime" data-value="2026-07-29T15:21:55+00:00" > 07/29/26, 15:21 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 95012 <span data-processor="relativetime" data-value="2026-07-30T07:44:32+00:00" > 07/30/26, 07:44 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 95013 <span data-processor="relativetime" data-value="2026-07-30T07:44:40+00:00" > 07/30/26, 07:44 </span>
-
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-07-30T08:10:12+00:00" > 07/30/26, 08:10 </span>Applied in changeset commit:366b2fb49089b21883eac8293fdbf80e8793a893.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-08-11T08:46:34+00:00" > 08/11/26, 08:46 </span>
I can confirm this issue