5

When using Google's Structured Data Testing Tool, I consistently get the error:

The URL could not be rendered. Some markup may be missing.

  • I have identified and fixed all of the structured data errors - I have 3 items, all of which have 0 errors, two of which have 0 warnings and one of which has 3 warnings.

  • I am using OpenGraph vocabulary (both og: and twitter:) in the first item and schema.org vocabulary in both subsequent items.

  • I am using <meta> elements in the <head> to structure the data in the first item and json-ld to structure the data in both subsequent items.

  • I have checked to see if the document markup validates on W3 Unicorn - it does.

Since the markup validates and the structured data is error-free, what does it mean when Google Structured Data Testing Tool consistently informs me:

The URL could not be rendered. Some markup may be missing.

The URL could not be rendered in what sense?


Update:

After further testing, I have established the following:

  1. The error is definitely being triggered by the markup inside the <body>...</body> of the document.
  2. There are multiple (as yet unknown) elements triggering the error.
  3. One of the errors is definitely the presence of a <footer>...</footer> element. A <body> which contains a <header> or a <main> (or both) will not trigger the error, but as soon as the <body> contains a <footer>, it will.
  4. One of the errors is an anchor which contains a class (eg. <a href="/my-page" class="link-to-my-page">My Page</a>) - when the class attribute is removed from the anchor, the anchor no longer triggers an error.
  5. One of the errors is the presence of one or more <article>...</article> elements. As soon as the <body> contains at least one <article>, it will trigger the error.
  6. One of the errors is any <img> element which references an SVG. If the src attribute points to a file which has an identical file-path but ends in .png, the error is not triggered.

Lightbulb Moment

  • The <img> element in 6. points to an SVG.
  • each <article> has a CSS background-image which is an SVG
  • The <a> which contains the class has a CSS background-image which is an SVG
  • The <footer> has a ::before and an ::after pseudo-element, each of which has a CSS background-image which is an SVG

Conclusion

Google Structured Data Testing Tool doesn't yet know how to process (or just ignore) references to SVG files.

8
  • Do you get this error right after entering your URL in the SDTT (before the extracted structured data is shown)? Is your page a plain old HTML document, or do you use JavaScript for showing the content?
    – unor
    Commented Nov 25, 2017 at 20:03
  • 1) I see this error several seconds after entering the URL in the SDTT. 2) When it appears, the error is overlaid over the top of the displayed extracted, structured data. 3) The page is a plain old HTML document (although after onload, some additional extra markup is added via javascript.
    – Rounin
    Commented Nov 25, 2017 at 20:14
  • 2
    I never encountered this error. Most of the time I’m pasting the markup (instead of letting the tool fetch the URL), though -- but I just tested a few pages via URL and didn’t get any error (the normal behaviour is just getting the extracted data on the right, no overlay). Is it possible for you to share the URL?
    – unor
    Commented Nov 25, 2017 at 21:54
  • 1
    I can reproduce the error with your page when checking via URL. I’m not sure, but I think the issue has to do with your JavaScript. Maybe while fetching the markup, the tool notices that your JS changes something that affects the already fetched markup, so the tool is no longer sure to get the markup correctly.
    – unor
    Commented Nov 26, 2017 at 1:07
  • 2
    I wondered the same myself, but I've tested the document with the javascript entirely removed and it does not remove the error. Please see my updates in the question above.
    – Rounin
    Commented Nov 26, 2017 at 10:23

1 Answer 1

5

After:

  • isolating error triggers
  • assessing what all the error triggers had in common (they all referred to external .svg files)

The answer is:

Google Structured Data Testing Tool doesn't yet know how to process (or just ignore) references to SVG files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.