Page 8 of 20 FirstFirst ... 67891018 ... LastLast
Results 71 to 80 of 193
  1. #71
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    263
    Plugin Contributions
    0

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Hi mc12345678
    Yes, the file made a difference!
    $canonicalLink is still the same, but when I try to access the relative link at the top of a Zen Cart page I can do so. So that is a success

    However, it only works when there is a single "&".

    It does not work when there is a "&" which in the Structured Data plugin is for the Twitter Card URL, which further encodes with htmlentites($canonicalLink).
    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. #72
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Quote Originally Posted by gernot View Post
    Hi mc12345678
    Yes, the file made a difference!
    $canonicalLink is still the same, but when I try to access the relative link at the top of a Zen Cart page I can do so. So that is a success

    However, it only works when there is a single "&".

    It does not work when there is a "&" which in the Structured Data plugin is for the Twitter Card URL, which further encodes with htmlentites($canonicalLink).
    Does FB still provide 404 response with the file or did that get resolved? Some of the other issues are actually in discussion (at least the issue with a products page being /index.php?products_id=xxx). I can provide what I also think is the solution to that issue as proposed by another zenner whose name I forget at the moment but I remember a few of those that were involved in the last couple of days.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Hi mc12345678,

    Facebook debugger now finds the page perfectly! Response 200, and all content seems to be fine.

    I notice that in the Structured Data plugin, only the Twitter card does a further encoding, as follows:
    Code:
     <meta name="twitter:image:alt" content="<?php echo htmlentities($image_alt, ENT_QUOTES, 'UTF-8'); ?>" />
     <meta name="twitter:url" content="<?php echo htmlentities($canonicalLink); ?>" />
    I expect there was a reason for that so I am not going to remove it right now (and Twitter seems to find my page even with the broken encoding).
    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.

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

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    I'd question why the data fed to the twitter card was already encoded with htmlentities and then encoded a second time; however, may be able to change the command to:
    Code:
    htmlentities($variable, ENT_COMPAT, CHARSET, false)
    adding the ", false" at the end so that it doesn't double encode and cause the &amp;amp; situation... The intent of the false is to not encode content to an htmlentity if it is already encoded. The default though (which is used here) is to encode everything even if it is already encoded...

    As for my use of CHARSET above, well ideally that is already set to 'UTF-8'; however, what it does is to ensure that the conversion is to the format supported by the site (current language/character set of the site/language pack).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Hi mc12345678
    Thanks, I changed the existing to :
    Code:
     <meta name="twitter:image:alt" content="<?php echo htmlentities($image_alt, ENT_QUOTES, 'UTF-8', false); ?>" />
     <meta name="twitter:url" content="<?php echo htmlentities($canonicalLink, ENT_COMPAT, CHARSET, false); ?>" />
    for now. Perfect! Source code now shows only a single "&amp;" in the URL, and Twitter shows the card fine (as before, mind you).
    The alternative image content I added "false" for good measure, not sure if that encoding definition is perfect or not.

    BTW, doing a regular trawl of the forums again today I came across a related issue here, with encoding of "&":
    https://www.zen-cart.com/showthread....my-Admin/page2
    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.

  6. #76
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Sorry not been able to look at this yet....thanks for the continued investigation..
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

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

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Probably useful to re-iterate here, that the Schema part (not Facebook or Twitter) for the product (not the direct constants for shop information) in Japanese are all \u...\u.... unicode characters. It looks like that encompasses all the parameters using json_encode().
    Is that the intended effect, that (presumably) all non-ASCII UTF-8 characters become human-unreadable?
    (Presumably there is nothing syntactically incorrect about the result, since it is merely a different form of the same characters, but not legible anymore by humans)
    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.

  8. #78
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    I've added this to the Github, thanks. Please check if there is anything else required.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

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

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Presumably such characters would get translated to a utf-8 readable format. Though how that is performed is possibly open for debate. Torvista commented that normally uses Ceon URI Mappings which I believe has some sort of translater associated with it to do that type of conversion at least for uris and possibly other input...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Structured Data Markup for Schema, Facebook Open Graph, Twitter...

    Hi mc12345678 and torvista
    I'm totally cool with whatever you think is good as long as it works reliably for SEO purposes, even if I as a human can't read the characters myself. I was merely raising the issue since I am using a non-European language and it might have been something buggy that had not been discovered yet.
    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.

 

 
Page 8 of 20 FirstFirst ... 67891018 ... LastLast

Similar Threads

  1. Replies: 13
    Last Post: 27 Jun 2019, 05:31 AM
  2. v150 Contact# structured data markup
    By ShopVille in forum General Questions
    Replies: 9
    Last Post: 12 Nov 2014, 03:01 PM
  3. I want to add Facebook open graph tags
    By stevemax in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Jul 2011, 07:07 PM
  4. Where do I add facebook open graph tags?
    By surlybroad in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 25 May 2011, 04:12 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