Yoast/wpseo-news

NewsArticle Schema Not working on Yoast News plugin

okupdatenumber opened this issue · 3 comments

NewsArticle Schema Not working on Yoast News plugin

@okupdatenumber can you please provide additional information and follow the template for bugreports? Although I am able to reproduce the issue, any information you can provide (like version numbers of plugins and WordPress, dates of when issues started happening, et cetera) may help us resolve this faster.

I tested on WP 5.3.2 with Yoast Premium 13.2 and Yoast News 12.3, 12.4 and 12.4.1:

  1. Added the posttype post to the News SEO sitemap in the News SEO options.
  2. Created a new post and checked the schema. I did not see any news-related schema. The post was successfully added to the News sitemap.

I am not sure when or where this schema should get shown, will dive into this more after the weekend.

Again, any information may help.

My steps to reproduce the issue with the expected result:

  1. Install and activate Yoast SEO 13.2.
  2. Install and activate News 12.4.1.
  3. Make sure you have Knowledge graph configured with Organization name and logo.
  4. Check your News SEO configuration, in my case:

Screenshot 2020-03-09 at 08 53 49

  1. Go to create new post, publish it.
  2. Navigate to this post and grab schema.
    My json output:
{
   "@context":"https://schema.org",
   "@graph":[
      {
         "@type":"Organization",
         "@id":"http://two.wordpress.test/#organization",
         "name":"Daria company1",
         "url":"http://two.wordpress.test/",
         "sameAs":[
            "https://twitter.com/yoast"
         ],
         "logo":{
            "@type":"ImageObject",
            "@id":"http://two.wordpress.test/#logo",
            "inLanguage":"en-US",
            "url":"http://two.wordpress.test/wp-content/uploads/2019/12/Zoidberg.png",
            "width":580,
            "height":798,
            "caption":"Daria company1"
         },
         "image":{
            "@id":"http://two.wordpress.test/#logo"
         }
      },
      {
         "@type":"WebSite",
         "@id":"http://two.wordpress.test/#website",
         "url":"http://two.wordpress.test/",
         "name":"two.wordpress.test",
         "inLanguage":"en-US",
         "description":"Just another WordPress site",
         "publisher":{
            "@id":"http://two.wordpress.test/#organization"
         },
         "potentialAction":{
            "@type":"SearchAction",
            "target":"http://two.wordpress.test/?s={search_term_string}",
            "query-input":"required name=search_term_string"
         }
      },
      {
         "@type":"WebPage",
         "@id":"http://two.wordpress.test/hey/#webpage",
         "url":"http://two.wordpress.test/hey/",
         "name":"hey - two.wordpress.test",
         "isPartOf":{
            "@id":"http://two.wordpress.test/#website"
         },
         "inLanguage":"en-US",
         "datePublished":"2020-01-28T14:27:18+00:00",
         "dateModified":"2020-01-28T14:27:18+00:00",
         "breadcrumb":{
            "@id":"http://two.wordpress.test/hey/#breadcrumb"
         }
      },
      {
         "@type":"BreadcrumbList",
         "@id":"http://two.wordpress.test/hey/#breadcrumb",
         "itemListElement":[
            {
               "@type":"ListItem",
               "position":1,
               "item":{
                  "@type":"WebPage",
                  "@id":"http://two.wordpress.test/",
                  "url":"http://two.wordpress.test/",
                  "name":"Home"
               }
            },
            {
               "@type":"ListItem",
               "position":2,
               "item":{
                  "@type":"WebPage",
                  "@id":"http://two.wordpress.test/hey/",
                  "url":"http://two.wordpress.test/hey/",
                  "name":"hey"
               }
            }
         ]
      },
      {
         "@type":"NewsArticle",
         "@id":"http://two.wordpress.test/hey/#article",
         "isPartOf":{
            "@id":"http://two.wordpress.test/hey/#webpage"
         },
         "author":{
            "@id":"http://two.wordpress.test/#/schema/person/d39d6429bf5de89f1b7c21eac45163aa"
         },
         "headline":"hey",
         "datePublished":"2020-01-28T14:27:18+00:00",
         "dateModified":"2020-01-28T14:27:18+00:00",
         "commentCount":0,
         "mainEntityOfPage":{
            "@id":"http://two.wordpress.test/hey/#webpage"
         },
         "publisher":{
            "@id":"http://two.wordpress.test/#organization"
         },
         "inLanguage":"en-US",
         "copyrightYear":"2020",
         "copyrightHolder":{
            "@id":"http://two.wordpress.test/#organization"
         }
      },
      {
         "@type":[
            "Person"
         ],
         "@id":"http://two.wordpress.test/#/schema/person/d39d6429bf5de89f1b7c21eac45163aa",
         "name":"admin",
         "image":{
            "@type":"ImageObject",
            "@id":"http://two.wordpress.test/#authorlogo",
            "inLanguage":"en-US",
            "url":"http://1.gravatar.com/avatar/ad5dd285560221a7302608c74c690035?s=96&d=mm&r=g",
            "caption":"admin"
         },
         "sameAs":[
            "https://www.facebook.com/admin",
            "admin",
            "http://linkedin.com/admin",
            "https://www.pinterest.com/admin",
            "https://twitter.com/admin",
            "https://myspace.com/admin",
            "https://www.youtube.com/admin",
            "https://soundcloud.com/admin",
            "admin",
            "https://en.wikipedia.org/wiki/admin"
         ]
      }
   ]
}

See that NewsArticle node is presented.

Screenshot 2020-03-09 at 08 56 48

Here is the doc https://developer.yoast.com/features/schema/news-seo/

Can you please clarify your steps and expected results?

For me, setting the organization and logo at step 3 solved the issue. @okupdatenumber please verify if thi solves your site as well, and if not, please provide more details.