Issue Bug Closed

#93300Canonical wrong with mountpoint

Richard Haeser 01/16/21, 16:08 updated 03/21/24, 15:53

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.

Reviews 2

History 613

  1. Gerrit Code Review pushed patch set 1 for master to change 68469 status Accepted Under Review 03/17/21, 08:47

  2. Gerrit Code Review pushed patch set 2 for master to change 68469 03/19/21, 12:48

  3. Gerrit Code Review pushed patch set 3 for master to change 68469 03/19/21, 12:54

  4. Gerrit Code Review pushed patch set 4 for master to change 68469 03/22/21, 20:21

  5. Gerrit Code Review pushed patch set 5 for master to change 68469 03/22/21, 20:23

  6. Richard Haeser changed description 03/25/21, 14:16

  7. Gerrit Code Review pushed patch set 1 for 10.4 to change 68635 03/26/21, 14:13

  8. Richard Haeser commented and changed status Under Review Resolved done 0 % 100 % 03/26/21, 14:15

    Applied in changeset commit:9c67aba9134a8c03b6c6184d0cdebbbf020efc1d.

  9. Gerrit Code Review pushed patch set 2 for 10.4 to change 68635 status Resolved Under Review 03/26/21, 14:21

  10. Richard Haeser commented and changed status Under Review Resolved 03/26/21, 14:40

    Applied in changeset commit:71536c687ca262a8a03e841d60e60cee6eeaeb1b.

  11. hwt3 no-lastname-given commented 04/08/21, 16:50

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

  12. Benni Mack changed status Resolved Closed 05/11/21, 16:01

  13. Christian Weiske commented 03/21/24, 15:53

    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/)