Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default [Done v157a] Canonical link now keeps the 'page=' parameter (zc156, too)

    As identified in this USU support-thread post, the page= parameter is no longer considered an exclusion.

    Using a fresh zc157a (beta) install with the demo products, specifically the Test Examples category, click on the categories sidebox to view the first page.

    zc155f: <link rel="canonical" href="http://localhost/zc155fusu/index.php?main_page=index&amp;cPath=23">
    zc156c: <link rel="canonical" href="http://localhost/zc156posm/index.php?main_page=index&amp;cPath=23" />
    zc157a: <link rel="canonical" href="http://localhost/zc157a/index.php?main_page=index&amp;cPath=23">

    Now, click to navigate to page 2:

    zc155f: <link rel="canonical" href="http://localhost/zc155fusu/index.php?main_page=index&amp;cPath=23">
    zc156c: <link rel="canonical" href="http://localhost/zc156posm/index.php?main_page=index&amp;cPath=23&amp;page=2" />
    zc157a: <link rel="canonical" href="http://localhost/zc157a/index.php?main_page=index&amp;cPath=23&amp;page=2">

    Not sure when in the zc156 releases this unwanted change was introduced.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Canonical link now keeps the 'page=' parameter (zc156, too)

    While I would agree thus far of not knowing how/what introduced it, I would disagree that "for some" that it is/was unwanted. Not saying I necessarily am in favor nor at the moment opposed to its presence, but I do recognize the trouble caused by the duplication of reference to the "first" page...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Canonical link now keeps the 'page=' parameter (zc156, too)

    Those results are interesting because includes/init_includes/init_canonical.php contains 'page' as a keepable parameter in ZC 1.5.5f.

    Here's the commit that "added it back": https://github.com/zencart/zencart/c...5d19e062776a9f

    Of course there is also a notifier in that area that can be used to address removal of such things as page=1...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Canonical link now keeps the 'page=' parameter (zc156, too)

    Quote Originally Posted by mc12345678 View Post
    Those results are interesting because includes/init_includes/init_canonical.php contains 'page' as a keepable parameter in ZC 1.5.5f.

    Here's the commit that "added it back": https://github.com/zencart/zencart/c...5d19e062776a9f

    Of course there is also a notifier in that area that can be used to address removal of such things as page=1...
    Nice detective work, @mc12345678! Now, if we could get @DrByte to chime in on what additional results are being lost by search engines when the 'page=' parameter is excluded.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Canonical link now keeps the 'page=' parameter (zc156, too)

    Quote Originally Posted by lat9 View Post
    Now, if we could get @DrByte to chime in on what additional results are being lost by search engines when the 'page=' parameter is excluded.
    I vaguely remember a series of forum complaints that precipitated that change.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Jul 2017
    Location
    West Midlands, UK
    Posts
    19
    Plugin Contributions
    0

    Default Re: Canonical link now keeps the 'page=' parameter (zc156, too)

    Hi,
    Thank you lat9 for starting this bug report. Whilst looking into improving the SEO for my website I noticed the following issue.

    On a fresh 1.5.7 install (as well as some of the previous versions) there is some duplicate content being created. This issue is present on categories containing more than 10 products.

    The bug can be noticed when navigating from page 2 back to page 1. As shown in the example below, the browser URL and canonical have parameters added.


    Page 1 browser URL (after navigating from page 2): example-website-com/index.php?main_page=index&cPath=23&sort=20a&page=1

    Page 1 canonical (after navigating from page 2): example-website-com/index.php?main_page=index&cPath=23&page=1


    When navigating to a category the first page always has the cPath parameter (as is expected). However, when navigating from page 2 back to page 1 the sort and page parameters are being applied. These parameters should be consistently applied (or excluded) on all links to page 1 – if they are not search engines may see these as duplicate pages as they have the same content (but different canonicals).

    As far as I understand the page= parameter is essential on page 2, page 3 etc... so each page can be indexed by search engines.

    I would be very grateful if someone could help look into this issue. If it requires a significant amount of work to resolve I would of course be willing to donate to help cover costs.
    --
    Many thanks
    Richard

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Canonical link now keeps the 'page=' parameter (zc156, too)

    So, lat9 says "having the page= parameter" is a bug, er "unwanted change", and seems to want page= to be removed.

    But richard7315 says "page= is essential", and also wants to always include "page=1" if no page-number is known.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Canonical link now keeps the 'page=' parameter (zc156, too)

    Quote Originally Posted by DrByte View Post
    So, lat9 says "having the page= parameter" is a bug, er "unwanted change", and seems to want page= to be removed.

    But richard7315 says "page= is essential", and also wants to always include "page=1" if no page-number is known.
    To throw another wrinkle, I say that page=1 should not be used or should not exist on the first page or by going to the first page, but other page= values should be used with the idea that the page parameter *could* be important.

    I have a modification prepared to prevent page=1 from showing on page changes, but the modification doesn't yet address removal of page=1 from the canonical link if the site is presented with that in the visited Web page.

    My reasoning is that the absence of a page parameter should resolve to the first page, that a page=1 parameter should not be presented to the resulting html, and that in cases where a paginated grouping is sequenced that a page=x where x is greater than or equal to 2 could be important to linking to the content. Unfortunately where items are randomly presented across multiple pages the page number doesn't reflect the same importance and actually adds no external value if the order changes on each page load or with each session.

    Having page=1 on a page that comprises only one page seems wasteful and having it at any other time seems pointless.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Canonical link now keeps the 'page=' parameter (zc156, too)

    Something like this?

    Code:
      if (isset($_GET['page']) && is_numeric($_GET['page']) && $_GET['page'] < 2) $excludeParams[] = 'page';
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Canonical link now keeps the 'page=' parameter (zc156, too)

    Quote Originally Posted by DrByte View Post
    So, lat9 says "having the page= parameter" is a bug, er "unwanted change", and seems to want page= to be removed.

    But richard7315 says "page= is essential", and also wants to always include "page=1" if no page-number is known.
    That was my (mis)interpretation of richard7315's posting in the USU support thread.

    One way or another, the first page of a listing should either always include the "page=1" parameter or never include that parameter to prevent duplicate-content errors.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 6
    Last Post: 31 Oct 2020, 04:35 PM
  2. [Done v157a] Product Master Category Bug
    By Footie1 in forum Bug Reports
    Replies: 7
    Last Post: 26 Oct 2020, 10:49 AM
  3. Replies: 3
    Last Post: 27 Jul 2020, 06:20 PM
  4. Replies: 5
    Last Post: 6 May 2010, 06:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR