Bug #86234

Missing Meta Tags on Pages with *_INT objects

Added by Robert Vock 2 months ago. Updated 2 days ago.

Status:
In Progress
Priority:
Must have
Category:
SEO
Target version:
-
Start date:
2018-09-12
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When a page has USER_INT or COA_INT objects and is delivered from cache, most of the meta tags are missing.

Steps to reproduce:
- Setup fresh TYPO3
- Single page with meta description and no_index=1
- following TypoScript:

page = PAGE
page.meta.keywords.field = keywords
page.meta.viewport = width=device-width,initial-scale=1
page.10 = TEXT
page.10.value = HELLO WORLD!
page.20 = USER_INT

This might be related to one of the following Bugs:

https://forge.typo3.org/issues/86012
https://forge.typo3.org/issues/63776

This outright kills pages on mobile. Safari on iOS displays the Desktop website when the viewport-meta tag is missing!

I tested this on 9.4.0 and on current master (1ff01bcb74a4ce73493bce0969222b02e5e85add).

Cache-Expiration.png View (134 KB) Robert Vock, 2018-11-08 09:19


Related issues

Related to TYPO3 Core - Bug #86012: Indexing of meta-tags not possible when *_INT-objects are on the page New 2018-08-28
Related to TYPO3 Core - Bug #63776: PageRenderer Hooks are called to late with uncached objects New 2014-12-11

Associated revisions

Revision 7985a69c (diff)
Added by Richard Haeser about 2 months ago

[BUGFIX] Cache generated meta tags

Cache generated meta tags to prevent losing meta tags when a
non-cached content element is on the page.

Resolves: #86234
Releases: master
Change-Id: I6d48feee40716fb07c694b787a329940d2740ad6
Reviewed-on: https://review.typo3.org/58261
Tested-by: TYPO3com <>
Reviewed-by: Markus Klein <>
Reviewed-by: Jörg Bösche <>
Reviewed-by: Guido Schmechel <>
Tested-by: Guido Schmechel <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>

History

#1 Updated by Susanne Moog 2 months ago

  • Category changed from Frontend to SEO
  • Target version set to 9 LTS

#2 Updated by Robert Vock 2 months ago

I am not sure, if Category SEO is correct. I think the main issue here is that the cached version of a page is different depending if there are *_INT objects on a page or not.

If the page has USER_INT-object, the cached content looks like this (data in cf_cache_pages):

<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="utf-8">
<!-- 
    This website is powered by TYPO3 - inspiring people to share!
    TYPO3 is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.
    TYPO3 is copyright 1998-2018 of Kasper Skaarhoj. Extensions are copyright of their respective owners.
    Information and contribution at https://typo3.org/
-->

<!-- ###TITLE48530d86be61846b4a1fd122df42580e### -->
<!-- ###META48530d86be61846b4a1fd122df42580e### -->

<!-- ###CSS_LIBS48530d86be61846b4a1fd122df42580e### -->
<!-- ###CSS_INCLUDE48530d86be61846b4a1fd122df42580e### -->
<!-- ###CSS_INLINE48530d86be61846b4a1fd122df42580e### -->

<!-- ###JS_LIBS48530d86be61846b4a1fd122df42580e### -->
<!-- ###JS_INCLUDE48530d86be61846b4a1fd122df42580e### -->
<!-- ###JS_INLINE48530d86be61846b4a1fd122df42580e### -->

<!-- ###HEADERDATA48530d86be61846b4a1fd122df42580e### -->
</head>
<body>
<!--TDS_48530d86be61846b4a1fd122df42580e-->
HELLO WORLD!<!--INT_SCRIPT.da26b631649bb71c9817450df3ffd500-->
<!-- ###JS_LIBS_FOOTER48530d86be61846b4a1fd122df42580e### -->
<!-- ###JS_INCLUDE_FOOTER48530d86be61846b4a1fd122df42580e### -->
<!-- ###JS_INLINE_FOOTER48530d86be61846b4a1fd122df42580e### -->
<!-- ###FOOTERDATA48530d86be61846b4a1fd122df42580e### -->
</body>
</html>
<!-- Cached page generated 12-09-18 16:59. Expires 13-09-18 16:59 -->

If the page does not have the USER_INT object, the cached data looks like this:

<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="utf-8">
<!-- 
    This website is powered by TYPO3 - inspiring people to share!
    TYPO3 is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.
    TYPO3 is copyright 1998-2018 of Kasper Skaarhoj. Extensions are copyright of their respective owners.
    Information and contribution at https://typo3.org/
-->

<title>Standard</title>
<meta name="generator" content="TYPO3 CMS" />
<meta name="description" content="description" />
<meta name="robots" content="noindex,follow" />

</head>
<body>
HELLO WORLD!

</body>
</html>
<!-- Cached page generated 12-09-18 17:01. Expires 13-09-18 17:01 -->

This is also responsible for the other two bugs (#86012 related to indexed_search and #63776: hooks working on favicon for example).

Of course it's possible to just fix the meta-tags issue, but I believe it's better to fix the underlying issue.

#3 Updated by Richard Haeser 2 months ago

  • Assignee set to Richard Haeser

#4 Updated by Susanne Moog 2 months ago

Hi,

The underlying issue is IMHO no general issue, yes in case there are USER_INT objects on a page, the page is cached and rendered differently. We won't "fix" that behaviour, as that is not a bug. In case of a cached page the whole page should be cached without any markers whatsoever and directly delivered from cache (It's not only a bit slower to replace marker, its multiple times slower on a fully cached page).

On a page with USER_INT objects the basic skeleton of the page gets cached and only the marker replacement parts get rerendered on each subsequent request. So basically the flow has three different states:
  • uncached (completely new generation of everything),
  • page itself cached but has USER_INTs and
  • fully cached page

so, that behaviour is no bug. The bug in this case is actually, that the meta tags are missing - because the header section is constructed more or less separately iirc. I'll take a look at the other bugs, soon.

#5 Updated by Richard Haeser 2 months ago

Had the same with title tag. I will fix this for meta tags.

#6 Updated by Richard Haeser 2 months ago

  • Status changed from New to Accepted

#7 Updated by Gerrit Code Review 2 months ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58261

#8 Updated by Gerrit Code Review 2 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58261

#9 Updated by Christian Kuhn 2 months ago

  • Related to Bug #86012: Indexing of meta-tags not possible when *_INT-objects are on the page added

#10 Updated by Christian Kuhn 2 months ago

  • Related to Bug #63776: PageRenderer Hooks are called to late with uncached objects added

#11 Updated by Gerrit Code Review about 2 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58261

#12 Updated by Gerrit Code Review about 2 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58261

#13 Updated by Gerrit Code Review about 2 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58261

#14 Updated by Gerrit Code Review about 2 months ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58261

#15 Updated by Gerrit Code Review about 2 months ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58261

#16 Updated by Gerrit Code Review about 2 months ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58261

#17 Updated by Richard Haeser about 2 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#18 Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed

#19 Updated by Joerg Kummer 5 days ago

Currently in TYPO3 9.5.1 pages, which contains a none cached plugin as content element (fx EXT:news searchform) have correct meta tags just for a given time. After some hours, all meta tags are missing again, except generator=TYPO3 CMS.
This breaks at least mobile websites, which depends on meta tag viewport data.

#20 Updated by Robert Vock 5 days ago

I thought, this was fixed for me as well. But after looking at the cache-expiration, I believe Joerg is correct and the metatags could disappear after a while (see attached screenshot).

The metatags are cached shorter than the page HTML

#21 Updated by Wolfgang Wagner 4 days ago

Can still confirm this bug in 9.5.1.

#22 Updated by Richard Haeser 2 days ago

  • Status changed from Closed to In Progress
  • Target version deleted (9 LTS)

Will try to reproduce for now, reopened this issue.

Also available in: Atom PDF