Project

General

Profile

Actions

Task #101621

closed

Make frontend meta tag twitter:card optional

Added by Patrick Lenk 11 months ago. Updated 8 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
SEO
Target version:
-
Start date:
2023-08-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
twitter, x, meta tag, optional, seo
Complexity:
Sprint Focus:

Description

The meta tag "twitter:card" should be optional. I would assume that a TypoScript such as page.meta.twitter:card > or page.meta.twitter_card > removes the meta tag in frontend. But this does not work, because ext:seo always add this to the meta tags.

The main problem in my opinion is, that there is no empty/none option to check in Line 84 in /seo/Classes/MetaTag/MetaTagGenerator.php
Its always added.

(Since twitter is X, it should be optional more than ever...)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #104097: Also check open graph to decide it twitter:card should be addedClosedKevin Appelt2024-06-13

Actions
Actions #1

Updated by Patrick Lenk 11 months ago

  • PHP Version changed from 8.2 to 8.1
Actions #2

Updated by Kevin Appelt 10 months ago

  • Status changed from New to Needs Feedback
  1. Even if we add a check around it, it's most probably set.
    twitter_card is a select field with the options summary and summary_large and the default of summary.
    So if nothing is changed, the value will be summary, the condition will become true and the meta tag gets rendered.
  2. twitter:card is still the valid and official meta tag, according to the X Developer Platform (see: https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started#started)
  3. AFAIK twitter assumes summary if nothing is set, so it wouldn't make a difference to remove it.

What is the specific use case for which you want to remove the meta tag? Maybe this will help to understand the requirement better and offer a solution.

Actions #3

Updated by Patrick Lenk 10 months ago

Thanks for your feedback. Yes without an none option, the tag is always added. There are many reasons to not force the twitter meta tag. In my case most of them are political or ethical. I just don't want to add anything from this company to my sites anymore. It should just configurable or optional like mostly all other things in TYPO3.

Actions #4

Updated by Gerrit Code Review about 1 month ago

  • Status changed from Needs Feedback to Under Review

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

Actions #5

Updated by Gerrit Code Review about 1 month ago

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

Actions #6

Updated by Georg Ringer about 1 month ago

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

Updated by Christian Kuhn 27 days ago

  • Related to Bug #104097: Also check open graph to decide it twitter:card should be added added
Actions #8

Updated by Benni Mack 8 days ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF