diesdasdigital / kirby-meta-knight

🔍 Meta Knight – SEO & Social Media Sharing Plugin for Kirby.
MIT License
109 stars 18 forks source link

Google search console complaining about Microdata #37

Open koalabear974 opened 3 years ago

koalabear974 commented 3 years ago

Hi! After installing Metaknight to my kirby website, google search console started to complain about a piece a metadata added by MetaKnight. Here's the error and the piece of code: Unparsable structured data > Reference to nonexistent item 'null' Code: <style itemscope itemtype="https://schema.org/WebSite" itemref="schema_name schema_description schema_image"></style>

Right now I just removed it as I'm not sure how important it is. But If someone could explain why GSC is complaining about it, and maybe how to fix it? Thanks in advance

GabrielRw commented 3 years ago

Had the exact same issue !

BenediktEngel commented 2 years ago

I also have the same issue. Does anybody got any news on that?

jonathanmuth commented 2 years ago

I am aware of the bug and will try to fix it in the next release. I believe it will only occur when no Meta Image has been uploaded.

As a temporary workaround add a meta image via the site-wide SEO tab.

BenediktEngel commented 2 years ago

Yes i also think it's that, cause schema_name and schema_description are added anyway. Even if these are empty. Maybe just check if there is an image and only include schema_image if true. One other thing i just saw: I think the If-else-statement in line 35-41 is useless, cause it generates the same output. But that just as a sidenote ;)

afbora commented 2 years ago

I have same issue. @BenediktEngel is right. schema_image should be avaiblable if seo image field is not empty.