nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
165 stars 69 forks source link

Structured Data outputs SEO Title Source as site name #1482

Closed fishriver closed 3 months ago

fishriver commented 3 months ago

Describe the bug

I have set a Site Name in the SEOmatic Site Settings and expect this value to be output in the WebSite structured Data as name. However, in my case the value of the field SEO Title Source is output instead.

{
  "@context": "http://schema.org",
  "@graph": [
    {
      "@type": "WebSite",
      "name": "My input from the SEO Title Source field",
      …

To reproduce

Steps to reproduce the behaviour:

  1. Set a Site Name in the Site Settings of SEOmatic
  2. Got to a page with Main Entity of Page set as "WebSite", set a SEO title (via SEO Title Source) different than the Site Name.
  3. Inspect the structured data of that page.
  4. The name property for the WebSite structured data shows whatever is set as SEO title.

Expected behaviour

For the name property I expect the Site Name (set in Site Settings) to be output.

Versions

khalwat commented 3 months ago

This is working as expected. The @webpage name property is set to the title: https://github.com/nystudio107/craft-seomatic/blob/develop-v5/src/seomatic-config/globalmeta/JsonLdContainer.php#L33

The @identity name property is set to the Site Name: https://github.com/nystudio107/craft-seomatic/blob/develop-v5/src/seomatic-config/globalmeta/JsonLdContainer.php#L63

fishriver commented 3 months ago

Thank you for your fast response and sorry for calling it a bug. How do I provide the site name to Google as described in this article?

khalwat commented 3 months ago

Is it not picking it up already? Do you have a live site I can look at?

fishriver commented 3 months ago

I realized the issue was due to a misunderstanding on my part. Everything is working now. Thank you for your help!