Review main Merged

58588[BUGFIX] Respect no_index while creating canonical and hreflang tags

Richard Haeser CR +2 V +2 Easy +47 −3 updated 10/27/18, 14:09

Commit message

When the current page is set to no_index, no canonical tag
and hreflang tags will be generated.

Review

  • Code review CR +2
    • Benni Mack +2
    • Guido Schmechel +1
    • Jörg Bösche +1
    • Marc Hirdes +1
    • Willi Wehmeier +1
  • Verified V +2
    • Benni Mack +2
    • Guido Schmechel +1
    • TYPO3com +1 CI

Issues 1

Files 5

Review log 2426

Show 1 earlier messages
  1. Richard Haeser uploaded patch set 1 10/06/18, 19:06

  1. Georg Ringer voted on patch set 1 V +1 CR +1 10/06/18, 19:09

  2. TYPO3com voted on patch set 1 V +1 10/06/18, 19:18 Completed build in 11m 18s on Sat, 6 Oct, 09:18 PM Test Summary: 37795 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-29344

  3. Christian Knauf voted on patch set 1 V -1 10/06/18, 19:48

  4. Richard Haeser commented on patch set 1 10/06/18, 20:09

    @christian, what doesnt work for you?
  5. Christian Knauf voted on patch set 1 V +1 10/06/18, 20:23

  6. Christian Knauf commented on patch set 1 10/06/18, 20:23

    > Patch Set 1: Verified+1 Oops, Sorry wanted to +1
  7. Christian Knauf commented on patch set 1 10/06/18, 20:23

    > Patch Set 1: Verified-1
  8. Christian Knauf commented on patch set 1 10/06/18, 20:28

    > > Patch Set 1: Verified-1
  9. Josef Glatz voted on patch set 1 V +1 CR +1 10/07/18, 20:57

  10. Marc Hirdes commented on patch set 1 CR -1 10/08/18, 07:13

    With this solution, if I have a detail page wich is set to noindex, no canonical and hreflang will be set at all. It could be that the extension details provide information for the canonical and hreflang, but the detail page without any params should not be indexed. It should be possible to hook into the generator before. If this result is empty and page is set to no_index, than show nothing.
  11. Richard Haeser commented on patch set 1 10/10/18, 05:21

    > With this solution, if I have a detail page wich is set to noindex, > no canonical and hreflang will be set at all. It could be that the > extension details provide information for the canonical and > hreflang, but the detail page without any params should not be > indexed. It should be possible to hook into the generator before. > If this result is empty and page is set to no_index, than show > nothing. Why would you like to set the detailpage to no_index if you want to index that page? Building the correct URL respecting parameters is forge issue 86577. If you have a detail page that will not contain any information, you should return a 404 and you have to do that in your controller. I'm not a huge fan of having hooks to "hide" the real problem. BTW: if we would like a hook, thats a task that should not prevent this bugfix to be merged IMO
  12. Marc Hirdes commented on patch set 1 CR 0 10/10/18, 07:11

    To return a 404 is a good point. Also it could be possible that the integrator will show there only a hint, that no news or other necessary detail parameter was set. This page than should not be indexed. The solution could be, that the hook for the canonical will be excecuted first and if this is empty and the page is set to no_index, than no canonical will be set. A hook for the hreflang, I agree, that this is a point for a new issue. I will create a ticket.
  13. Marc Hirdes commented on patch set 1 10/10/18, 08:45

    https://review.typo3.org/#/c/58600/ is the better solution for the canonical.
  14. Richard Haeser uploaded patch set 2 10/10/18, 20:06

  15. TYPO3com voted on patch set 2 V +1 10/10/18, 20:18 Completed build in 11m 31s on Wed, 10 Oct, 10:18 PM Test Summary: 37804 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-29405

  16. Jörg Bösche voted on patch set 2 CR +1 10/11/18, 06:38

  17. Marc Hirdes commented on patch set 2 CR -1 10/11/18, 06:44

    Take a look here. https://review.typo3.org/#/c/58600/1/typo3/sysext/seo/Classes/Canonical/CanonicalGenerator.php on line 83. This is where the if "no_index" statement should be located. What do you think?
  18. Richard Haeser commented on patch set 2 10/13/18, 12:05

    Why should it only be there Marc? If no_index is set, no canonical should be set at all, so it can safely be done in an early state. And you have the option to overrule it by hooking into it.
  19. Marc Hirdes commented on patch set 2 CR 0 10/15/18, 07:03

    If I understand it correctly, no canonical should link to a page which is set to no_index. Because then you tell Google to index the page, but then please not. That's confusing. If you have set a canonical link to another page, then you should render the link rather than the no_index. Then you say to Google please index the other page. To set no_index in this case is also confusing, but maybe not so worse.
  20. Richard Haeser commented on patch set 2 10/15/18, 19:28

    See https://www.reddit.com/r/TechSEO/comments/8yahdr/2_questions_about_the_canonical_tag/e2dey9i/?context=1 where Google's John Mueller tells to not mixup no_index and canonicals to send clear signals to Google.
  21. Marc Hirdes commented on patch set 2 CR +1 10/16/18, 06:42

    Ok, if we follow this approach, not to mix it, then this patch is good. It depends then on the editor, to set the canonical or no_index. In my opinion that's ok.
  22. Willi Wehmeier voted on patch set 2 CR +1 10/19/18, 05:57

  23. Guido Schmechel voted on patch set 2 V +1 CR +1 10/27/18, 12:03

  24. Benni Mack voted on patch set 2 V +2 CR +2 10/27/18, 14:09

  25. Benni Mack merged patch set 3 10/27/18, 14:09