Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    263
    Plugin Contributions
    0

    Default canonicakLink broken?

    Hi,
    I am on ZC 1.5.6c, PHP 7.3.15, MariaDB 10.3.22. Site is:
    https://www.proteawines.jp/shop/

    I think $canonicalLink is broken for products, although it seems to work for categories.
    I initially noted that Facebook is having trouble with previewing products, using the Structured Data plugin.
    Looking at the canonical URLs generated (with "&" as "&"), I saw that without cPath the links are not valid in my browser even.
    But category links are fine. Summary:
    https://www.zen-cart.com/showthread....04#post1368504

    Looking at my site for a product, I have:
    Code:
    <link rel="canonical" href="https://www.proteawines.jp/shop/index.php?main_page=product_info&amp;products_id=188" />
    <link rel="alternate" href="https://www.proteawines.jp/shop/index.php?main_page=product_info&amp;products_id=188&amp;language=ja" hreflang="ja" />
    <link rel="alternate" href="https://www.proteawines.jp/shop/index.php?main_page=product_info&amp;products_id=188&amp;language=en" hreflang="en" />
    None of these links is found in Firefox.
    Category links have the same issue in Firefox, although they seem to be accepted by Facebook:
    Code:
    <link rel="canonical" href="https://www.proteawines.jp/shop/index.php?main_page=index&amp;cPath=82" />
    <link rel="alternate" href="https://www.proteawines.jp/shop/index.php?main_page=index&amp;cPath=82&amp;language=ja" hreflang="ja" />
    <link rel="alternate" href="https://www.proteawines.jp/shop/index.php?main_page=index&amp;cPath=82&amp;language=en" hreflang="en" />
    Sorry I do not understand the ins and outs of the escaping convention, but I assume an href link should work in a browser.
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  2. #2
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    263
    Plugin Contributions
    0

    Default Re: canonicakLink broken?

    Was reading up on href, and it sounds like href supportes unicode in HTML5, so for UTF-8 pages the links could be in English, Japanese, or whatever. And no HTML entities either, as far as I can tell from the pretty hard to read specs. For HTTP, seems one would still need percentage-encoding for path, and punycode for domain names.

    Refs:
    https://www.w3.org/International/articles/idn-and-iri/
    https://html.spec.whatwg.org/multipa...hyperlink-href
    https://url.spec.whatwg.org/

    On the other hand, this Google thread indicates "&" must be encoded:
    https://support.google.com/webmaster...G8CxjZ0/?hl=fr

    Ack, misspelt the thread title!
    Last edited by gernot; 5 May 2020 at 09:42 AM.
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

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

    Default Re: canonicakLink broken?

    Quote Originally Posted by gernot View Post
    I initially noted that Facebook is having trouble with previewing products, using the Structured Data plugin.
    Is this the real issue that you're trying to solve?
    .

    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.

  4. #4
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    263
    Plugin Contributions
    0

    Default Re: canonicakLink broken?

    Hi Dr Byte,
    No, it was the initial problem I was trying to solve. Then I noticed that all the SEO links are the same, it was not that the one for Facebook was different. Looking at the links, with the double escaping "&amp;amp;" and inability to read in browser made me decide to file a bug (though as I wrote I was not sure of the intended format). The fix provided by mc12345678 works, and as I understand it these is some discussion going on about this type of issue elsewhere on the board.
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

 

 

Similar Threads

  1. broken links or broken page. Help Please!
    By jim23866 in forum General Questions
    Replies: 1
    Last Post: 14 Jan 2011, 11:13 PM
  2. Broken shipping?
    By dacio1 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 22 Sep 2008, 08:28 PM
  3. Broken????
    By wickedcrf in forum General Questions
    Replies: 4
    Last Post: 8 Jan 2007, 11:53 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