Review main Merged

68469[BUGFIX] Render canonical link of target page when page is in mountpoint

Richard Haeser CR +2 V +2 Normal +139 −6 updated 03/26/21, 14:13

Commit message

When a page is within a mountpoint, the normal behaviour is to generate
a link within the mountpoint. As the content is shown from another page,
the url of the target page is necessary as a canonical to avoid
duplicate content. To do this, we temporarily remove the mountpoint
information while creating the canonical link which results in the
link to the target page.

Review

  • Code review CR +2 Done
    • Richard Haeser +2
    • Christian Kuhn +1
    • Riny van Tiggelen +1
  • Verified V +2 Done
    • Richard Haeser +2
    • Franz Kugelmann +1
    • Christian Kuhn +1
    • Riny van Tiggelen +1
    • TYPO3com +1 CI
    • core-ci +1 CI

Issues 1

Files 4

Review log 2333

Show 68 earlier messages
  1. Richard Haeser uploaded patch set 1 03/17/21, 08:47

  2. TYPO3com voted on patch set 1 V +1 03/17/21, 08:54 Completed build in 06m 59s on Wed, 17 Mar, 08:54 AM Test Summary: 32919 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10179

  3. core-ci voted on patch set 1 V +1 03/17/21, 08:58 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1623

  4. Franz Kugelmann commented on patch set 1 V +1 03/18/21, 13:12

    Great! Patch works both in 10.4.14 and 11.1.1.
  5. Xavier Perseguers commented on patch set 1 CR -1 03/19/21, 09:14

    I prefer to give a -1 at this point by reading because of the following use case (currently in v9 but don't want to face a problem when upgrading to v10 later). I've 2 installs with 200-300 club websites with basically this configuration: ``` |-- site A | |-- some page A1 | `-- MP to common pages |-- site B | |-- some page B1 | |-- some page B2 | `-- MP to common pages `-- common pages |-- common page 1 `-- common page 2 ``` common page needs a pseudo-site configuration with root as `/` but is really only a folder and cannot be accessed canonically in any way. Those pages are for instance "Impressum", "Copyright" and the rest, which will be publicly accessible or (another MP) some intranet pages providing common behaviour for all sites, once logged-in. This latter case is less of a problem regarding SEO since behind a login and thus cannot be crawled. But this shows that I've a real-life use case where there's actual "duplicate" content but on fully different websites and it cannot be considered real duplicate content as if I had mounted part of a website's page tree at another place of the tree, within the same site. In that case, I fully agree having a canonical set as suggested with this patch.
  6. Richard Haeser uploaded patch set 2 03/19/21, 12:48

  7. Richard Haeser commented on patch set 2 CR -1 03/19/21, 12:50

    On it
  8. Richard Haeser uploaded patch set 3 03/19/21, 12:54

  1. TYPO3com voted on patch set 2 V +1 03/19/21, 12:54 Completed build in 06m 17s on Fri, 19 Mar, 12:54 PM Test Summary: 32925 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10234

  2. core-ci voted on patch set 2 V +1 03/19/21, 12:58 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1692

  3. Xavier Perseguers voted on patch set 3 CR +1 03/19/21, 13:00

  4. TYPO3com voted on patch set 3 V +1 03/19/21, 13:01 Completed build in 06m 40s on Fri, 19 Mar, 01:01 PM Test Summary: 32925 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10235

  5. core-ci voted on patch set 3 V +1 03/19/21, 13:05 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1693

  6. Guido Schmechel voted on patch set 3 CR +1 03/20/21, 10:06

  7. Richard Haeser uploaded patch set 4 03/22/21, 20:21

  8. Richard Haeser uploaded patch set 5 03/22/21, 20:23

  9. TYPO3com voted on patch set 4 V +1 03/22/21, 20:28 Completed build in 07m 38s on Mon, 22 Mar, 08:28 PM Test Summary: 32928 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10299

  10. TYPO3com voted on patch set 5 V +1 03/22/21, 20:30 Completed build in 06m 49s on Mon, 22 Mar, 08:30 PM Test Summary: 32928 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10300

  11. core-ci voted on patch set 4 V +1 03/22/21, 20:32 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1773

  12. core-ci voted on patch set 5 V +1 03/22/21, 20:36 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1774

  13. Franz Kugelmann commented on patch set 5 V +1 03/23/21, 09:38

    Unresolved

    Works as expected in both 10.4.14 and 11.1.1
  14. Christian Kuhn voted on patch set 5 CR +1 03/25/21, 13:39

  15. Richard Haeser commented on patch set 5 03/25/21, 14:16

    I added some testing instructions to the original issue on forge
  16. Benni Mack commented on patch set 5 03/25/21, 15:12

    CanonicalGenerator.php:166

    I mean, we could simply check if the target page is within the same site, right?
  17. Richard Haeser commented on patch set 5 03/25/21, 15:16

    CanonicalGenerator.php:166 Reply

    The target page should not necessarily be in the same site. The issue is that some people have pages outside any siteroot (but do have a site config for this tree). So checking if it is within with the same site will not solve this issue IMO. See the comment of Xavier for some explanation.
  18. Christian Kuhn voted on patch set 5 V +1 03/26/21, 10:06

  19. Christian Kuhn voted on patch set 5 V 0 03/26/21, 11:54

  20. Riny van Tiggelen voted on patch set 5 V +1 CR +1 03/26/21, 13:28

  21. Benni Mack commented on patch set 5 03/26/21, 13:32

    CanonicalGenerator.php:166 Reply

    Yes, I see the point, but AFAIK in v10 every rootpage has a site :) that means a sys-folder which is shared, as well.
  22. Richard Haeser commented on patch set 5 03/26/21, 13:34

    CanonicalGenerator.php:166 Reply

    Well in this case it is a sysfolder which is not a rootpage, but does have a site config. Just like in the test.
  23. Christian Kuhn voted on patch set 5 V +1 03/26/21, 14:12

  24. Richard Haeser voted on patch set 5 V +2 CR +2 03/26/21, 14:13

  25. Richard Haeser merged patch set 6 03/26/21, 14:13