Jump to content

Structured data 'local business' items are invalid

Go to solution Solved by Susana_SQSP,

Recommended Posts

Posted

Site URL: https://edume.com

I'm seeing hundreds of errors for structured data across our site. Google is telling me there is an issue with the Structured Data Type: Local business, because it's missing the field “name”, therefore ’Not all markup is eligible for rich results’. 
 
I'm pretty sure that the error lies in this section of the HTML:
 
<script type="application/ld+json">{"image":"https://static1.squarespace.com/static/5dd67d2aaec74929770fe3cd/t/5f22d3f925594f27b8e21b8e/1605178318421/","openingHours":"Mo 09:00-17:30, Tu 09:00-17:30, We 09:00-17:30, Th 09:00-17:30, Fr 09:00-17:30, , ","@context":"http://schema.org","@type":"LocalBusiness"}</script>
 
The markup (schema) is only mentioning an image, opening hours, and a type ‘LocalBusiness’, without the “name” of the business field (ie EduMe) therefore Google isn't accepting the code and won’t use it for their Local Business structured data results. I found more information on this here: https://developers.google.com/search/docs/data-types/local-business
 
Our business name is filled in within our Marketing > Location Management panel AND Settings > Business Information. Is there a way for Squarespace to fix this code to include our business name? Thanks.

Screenshot 2021-03-11 at 11.16.18.png

  • 2 months later...
Posted

Hey Squarespace, why don't you be useful for once and chime in here. Isn't this what the community is about? Helping? If you're not going to allow people to "call" technical support, then at least have someone monitoring this data so they can provide solutions.

 

  • Solution
Posted

Hi everyone, 

Thanks for posting about this issue. 

I'd like to clarify that as outlined in this Squarespace Help article, structured data warnings usually mean that Google is looking for specific markup code on your site and can't find it. However, rest assured that your website will still be indexed by Google and eligible for features like rich snippets.

These warnings are something that our engineers are aware of and currently monitoring for potential platform improvements in the future. In the meantime and as suggested in the guide, you might want to use Google’s Data Highlighter to tag information that should display in rich snippets, if that's what you're aiming for. 

I also would like to take this opportunity to highlight that the Squarespace Forum is mainly a peer to peer community -  a space for Squarespace users and professionals to discuss best practices, seek advice, and share coding solutions for advanced customizations. Thus, and as it is outlined in section 6 of the forum guidelines we don't actively track feature requests in the forum. For any feedback that you would like to be logged, contacting our Customer Support team would be the best approach. 

 

  • 1 month later...
Posted

I'm having the same issue and it's really frustrating.  When I change my business hours in the Business Information page the Google Structured Data Tool updates it immediately.  When I add my business name it still does not update it.

Is there a way to turn this off altogether?  I am now using custom Location code and hoping that it will just override the mess that squarespace has left me with.

  • 5 months later...
Posted (edited)

I have the same issue.
I have noted that whenever ther is something wrong with SquareSpace, their answer is that it is not important. If this were not important, tools like Semrush would not report.

Stop making excuses and solve the issues

 

 

Edited by victorc
  • 3 months later...
Posted

I have the same issue. I think because some template squarespace has is from a while ago, while google update their search console stuff, they do provide a way of how new format should be. And some times is just template has error. I think mine simply written by mistake. 

If your site allow you to input all the info you are missing, and google shows missing field, its mostly because the original write made error. press f12 or just download a product page html to sublime text, Find the tag you are missing, such as Brand, name, Product, or just find application/ld+json   

From there you can see the rich results section. On my case is all the missing field is in there under "offer" instead of being a individual line. 

There are people written some code about simply disable entire ld+json. But that will make my site even home page will not be listed as rich result. That part on my end looks fine. 

here is how they disable them:

https://www.marksmen.studio/blog/fix-issues-squarespace-schema-markup

 

But the product page doesn't support inject css or script on header, Im trying to see if i can over write and limited all ld+json on store page. And then I will see if I can put all product ld+json section into the main store page. 

  • 6 months later...
Posted

Great, 

 

So this is a historical issue on Squarespaces Behalf, Clearly this hasn't been resolved as I am experiencing similar issues over a year later. 😕 

Agreed, people above are echoing my exact thoughts and scenarios now. If it wasn't important why do several other sites flag it as an issue? why does my site rank so low compared to similar sites. . . . who ironically don't have these issues. . . . 

 

Customer service is a waste of space if you can even get in contact with them. 

Sadly I had sung Squarespace's praises and recommended them to several people who joined this platform. BIG MISTAKE. 

 

  • 3 weeks later...
  • 3 months later...
  • 4 weeks later...
Posted (edited)

This is an error made by Squarespace theme/software. It auto-generates incorrect schema markup script, which Google automatically flags with errors because it contains errors. There is a solution to this. Remove all existing business information from your Settings>Business Information.

Take this script/code and carefully replace existing business information/details with yours, be sure to keep all quotes and comas as is. Use a plain text editor file, without formatting.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "LocalBusiness",
  "name": "Business Name",
  "url": "https://www.affjfj.com",
  "logo": "https://images.squarespace-cdn.com/content/v1/6a-4323-b81c-2bd70651f814/color_transparent+Final+for+Site.png?format=1500w",
  "address": {
    "@type": "PostalAddress",
    "addressLocality": "New York",
    "addressRegion": "NY",
    "postalCode": "10001",
    "streetAddress": "244 5th Ave, 2nd Floor"
  },
  "telephone": "(553) 557-9577",
  "priceRange": "$",
  "currenciesAccepted": "USD",
  "paymentAccepted": "Credit Card, PayPal",
  "openingHoursSpecification": [
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": [
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday"
      ],
      "opens": "09:00",
      "closes": "17:00"
    },
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": [
        "Saturday"
      ],
      "opens": "10:00",
      "closes": "16:00"
    }
  ]
}
</script>

 

Once you've updated the script with your business information, hours, etc. Please copy and paste the code into Google Rich Results/Schema validator tool: https://search.google.com/test/rich-results.

If you don't have any critical errors, then copy and paste the code using Settings>Advanced>Code Injection

Paste the code into HEADER section. Then save. 

 

 

 

Edited by sure11
  • 4 months later...
  • 2 months later...
Posted (edited)
On 5/20/2021 at 4:06 AM, Susana_SQSP said:

[...] structured data warnings usually mean that Google is looking for specific markup code on your site and can't find it. However, rest assured that your website will still be indexed by Google and eligible for features like rich snippets.

@Susana_SQSP, please understand that these are not warnings - but "Critical Errors"  - which, according to Google, are required to be resolved in order to be eligible to appear in rich results.

There are at-least two cases which are producing Critical Errors. 

Case 1: Critical Error with LocalBusiness Object

As described in the original post, the LocalBusiness Structured Data object - which is automatically being created by Squarespace and injected into the webpage - produces a Critical Error, citing that a required field, "name", is missing. The "name" field is required according to Google's documentation for LocalBusiness structured data objects. Because Squarespace is not providing the "name" field in the LocalBusiness Structured Data object, a Critical Error is thrown, and therefore the objects (and the information they represent) are not eligible for rich results. 

Here is an example of the LocalBusiness Structured Data object's Critical Error showing in Google's Rich Results Test for a Squarespace-hosted website: https://search.google.com/test/rich-results/result?id=s3kH4KIuxFtUVxtcPfMoVg 

From my testing, one cause of this error is when "Business Name" is missing from the Website Settings > Business Information > PHYSICAL LOCATION > Business Name field.

The Squarespace Product / Engineering Teams might consider making this a required field, or, not producing the LocalBusiness Structured Object if it's missing...

And users should ensure this field is filled-out to avoid the error, in addition to paying attention to Case 2... 

Case 2: Critical Errors with Organization Object

If the same website includes a Phone Number in the Website Settings > Business Information > CONTACT PHONE NUMBER section, a second Structured Data object appears to be created with type: "Organization." Even though this object appears to use some information from the Website Settings > Business Information > PHYSICAL LOCATION -- such as Business Name and address, the Organization Structured Data object always shows two Critical Errors due to missing fields: "Name," and "Image". (Name appears to be included as "LegalName", but Google is wanting "name"). 

Here is an example of the Organization Structured Data object with Critical Errors showing in Google's Rich Results Test for a Squarespace-hosted website:  https://search.google.com/test/rich-results/result?id=t0DuKH4gdkyeU5pejFw2og

For clarity, in the example directly above, the Business Name was filled out - avoiding the Critical Error in Case 1 related to the LocalBusiness object; but now, because the Phone Number is included, the second Structured Data object for Organization appears - with two Critical Errors. 

The Squarespace Product / Engineering Teams should correct the errors relating to the Organization Structured Data object. 

(Note: From a Product / Engineering perspective, Google's documentation for the Organization Structured Data object is confusing because they seem to inappropriately interchange schema.org's "Organization" with "Logo" - making the "required fields" uncertain... but based on Google's Rich Test results, we know that in order for the object to be eligible for Rich Results, we need to include "name" and "image" fields in the Structured Data object). 

 

Overall, both of these cases are important to resolve because they impact the success of the website's SEO. 

Here is an example of a successful Rich Results test for the same site: https://search.google.com/test/rich-results/result?id=WNRhQVDwCF0aIcKdTwFiOA - This was achieved by including Business Name, without a Phone Number. You will see that "Preview Results" is available on the page, whereas you cannot Preview SEO results with Case 1 Critical Errors because the object is invalid. 

Edited by Sparkyish
  • 3 months later...
Posted

Bumping this as it needs to be fixed by SquareSpace. We are a Webflow development agency and went with SquareSpace just to get our company site up quickly, and we will be leaving SquareSpace because of this issue to build our business site on Webflow. This is a critical error, and as people have said above, it needs to be addresses so that SquareSpace customers can improve their SEO performance. Will not be recommending SquareSpace untilIf anyone else wants support switching off, feel free to reach out. https://www.rexmarketingandcx.com/

  • 5 months later...
Posted (edited)

Dear All, I'm a novice but I have acquired a trusty friend in ChatGpt, and together, and I mean together, because this took hours, we found this solution.  My stats for accessibility rose from 43 to 92 after applying this, thought I'd share the love... I hope it helps... please bare in my I am no expert and do all the necessary check you need to to ensure it doesn't impact negatively elsewhere. This code goes in Footer of Code injection. Be sure to put in your own business info in the relevant places:

<script>
  document.addEventListener("DOMContentLoaded", function() {
    var elements = document.querySelectorAll('script[type="application/ld+json"]');
    elements.forEach(function(element) {
      try {
        var jsonData = JSON.parse(element.innerHTML);

        // Update LocalBusiness schema
        if (jsonData['@type'] === 'LocalBusiness') {
          if (!jsonData.name || jsonData.name === "") {
            jsonData.name = "YOUR BUSINESS NAME";
          }
          if (!jsonData.url || jsonData.url === "") {
            jsonData.url = "https://www.business.com";
          }
          if (!jsonData.logo || jsonData.logo === "") {
            jsonData.logo = "URL of your logo";
          }
          if (!jsonData.address || jsonData.address === "") {
            jsonData.address = {
              "@type": "PostalAddress",
              "addressLocality": "Region",
              "addressRegion": "Region code",
              "postalCode": "Postal code",
              "streetAddress": "Street",
              "addressCountry": "Country code"
            };
          }
          if (!jsonData.telephone || jsonData.telephone === "") {
            jsonData.telephone = "telephone number";
          }
          if (!jsonData.priceRange || jsonData.priceRange === "") {
            jsonData.priceRange = "your currency symbol";
          }
          if (!jsonData.currenciesAccepted || jsonData.currenciesAccepted === "") {
            jsonData.currenciesAccepted = "your currency code";
          }
          if (!jsonData.paymentAccepted || jsonData.paymentAccepted === "") {
            jsonData.paymentAccepted = "Credit Card";
          }
          if (!jsonData.openingHoursSpecification || jsonData.openingHoursSpecification.length === 0) {
            jsonData.openingHoursSpecification = [
              {
                "@type": "OpeningHoursSpecification",
                "dayOfWeek": [
                  "Monday",
                  "Tuesday",
                  "Wednesday",
                  "Thursday",
                  "Friday"
                ],
                "opens": "09:00",
                "closes": "17:00"
              },
              {
                "@type": "OpeningHoursSpecification",
                "dayOfWeek": [
                  "Saturday"
                ],
                "opens": "10:00",
                "closes": "14:00"
              }
            ];
          }
          element.innerHTML = JSON.stringify(jsonData);
        }

        // Update Organization schema
        if (jsonData['@type'] === 'Organization') {
          if (!jsonData.legalName || jsonData.legalName === "") {
            jsonData.legalName = "Business legal name";
          }
          element.innerHTML = JSON.stringify(jsonData);
        }

      } catch (e) {
        console.error("Error parsing JSON-LD: ", e);
      }
    });
  });
</script>
 

Edited by AngelHarry
  • 2 months later...
Posted

I have the same problem. I changed the business information settings, it didn't remove the error. Reading this forum doesn't make squarespace customer service look very good I am sad to say :I

Posted
On 4/10/2023 at 8:34 PM, sure11 said:

This is an error made by Squarespace theme/software. It auto-generates incorrect schema markup script, which Google automatically flags with errors because it contains errors. There is a solution to this. Remove all existing business information from your Settings>Business Information.

Take this script/code and carefully replace existing business information/details with yours, be sure to keep all quotes and comas as is. Use a plain text editor file, without formatting.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "LocalBusiness",
  "name": "Business Name",
  "url": "https://www.affjfj.com",
  "logo": "https://images.squarespace-cdn.com/content/v1/6a-4323-b81c-2bd70651f814/color_transparent+Final+for+Site.png?format=1500w",
  "address": {
    "@type": "PostalAddress",
    "addressLocality": "New York",
    "addressRegion": "NY",
    "postalCode": "10001",
    "streetAddress": "244 5th Ave, 2nd Floor"
  },
  "telephone": "(553) 557-9577",
  "priceRange": "$",
  "currenciesAccepted": "USD",
  "paymentAccepted": "Credit Card, PayPal",
  "openingHoursSpecification": [
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": [
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday"
      ],
      "opens": "09:00",
      "closes": "17:00"
    },
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": [
        "Saturday"
      ],
      "opens": "10:00",
      "closes": "16:00"
    }
  ]
}
</script>

 

Once you've updated the script with your business information, hours, etc. Please copy and paste the code into Google Rich Results/Schema validator tool: https://search.google.com/test/rich-results.

If you don't have any critical errors, then copy and paste the code using Settings>Advanced>Code Injection

Paste the code into HEADER section. Then save. 

 

 

 

This worked for me, but this is what I did:

  1. Accessed the Business Information page under Settings and deleted all my business information.
  2.  Used the schema above and modified the details to my sites info.
  3. I added the custom schema to the following areas:
    • Home>Advanced>Page Header Code Injection

    • Website Tools>Code  Injection>Header

  4. Ran an audit on my site and generated the same errors again regarding Address and Name.

  5. Accessed the Business Information page under Settings and added all my business information again.

  6. Ran the audit again all errors are gone!

I don't know if the order in which I did things mattered, but it appears that you need the custom schema in both areas in addition to completing the Business Information page 🤓.

 

  • 2 weeks later...
  • 5 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.