Project

General

Profile

Actions

Bug #93300

closed

Canonical wrong with mountpoint

Added by Richard Haeser almost 4 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Must have
Category:
SEO
Target version:
-
Start date:
2021-01-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Issue originally from https://stackoverflow.com/questions/65732474/typo3-render-correct-canonical-of-selected-mountpoint

When I set the doktype of a page to Mount Point enter image description here and then set mount_pid_ol to Show the mounted page the canonical-tag of the current, site is rendered. Not the canonical of the site selected in mount_pid.

Is that Mount Point option somehow limited with the core SEO plugin since also the whole SEO-Tab is missing after selecting Mount Point?

Testing instructions to see how it should be:
- Create a mount point (lets call it page x) with mount_pid_ol set to 1
- Set the target of the mountpoint to another page (we will call it page y for now)
- If you visits page x in frontend, you should see a canonical pointing to page y

You can also create subpages on page y, which should be available below page x as well (in frontend). All those pages should point towards their page y url structure.

If you have set mount_pid_ol to 0, the subpages should still point towards their targets ( they y variant ). The mount page itself should have a canonical to the page x itself.

Actions #1

Updated by Gerrit Code Review over 3 years 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/c/Packages/TYPO3.CMS/+/68469

Actions #2

Updated by Gerrit Code Review over 3 years 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/c/Packages/TYPO3.CMS/+/68469

Actions #3

Updated by Gerrit Code Review over 3 years 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/c/Packages/TYPO3.CMS/+/68469

Actions #4

Updated by Gerrit Code Review over 3 years 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/c/Packages/TYPO3.CMS/+/68469

Actions #5

Updated by Gerrit Code Review over 3 years 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/c/Packages/TYPO3.CMS/+/68469

Actions #6

Updated by Richard Haeser over 3 years ago

  • Description updated (diff)
Actions #7

Updated by Gerrit Code Review over 3 years ago

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

Actions #8

Updated by Richard Haeser over 3 years ago

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

Updated by Gerrit Code Review over 3 years ago

  • Status changed from Resolved to Under Review

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

Actions #10

Updated by Richard Haeser over 3 years ago

  • Status changed from Under Review to Resolved
Actions #11

Updated by hwt3 no-lastname-given over 3 years ago

This issue also exists in TYPO3 9 (9.5.26). Can / would it be fixed for this core version, too?

Actions #12

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed
Actions #13

Updated by Christian Weiske 8 months ago

I actually had the requirement that the mount point's URL, and not the mount point target's URL, should be used as canonical.

The solution is to disable TYPO3's own canonical generation and do it yourself:

config.disableCanonical = 1

page {
    headerData {
        21 = TEXT
        21 {
            htmlSpecialChars = 1
            typolink {
                parameter.data = TSFE:id
                returnLast = url
                addQueryString = 1
                addQueryString.method = GET
                forceAbsoluteUrl = 1
            }
            wrap = <link rel="canonical" href="|"/>
        }
    }
}

(Mostly taken from https://www.agentur-ibk.de/typo3-tutorial-schulung/typo3-snippets/canonical-link-typoscript-seo-typo3/)

Actions

Also available in: Atom PDF