• When checking any post on my site, I’m getting one error that keeps appearing in the google structured data testing tool. I couldn’t find this problem in any of the support posts.

    I’m using “blogposting” for posts.

    Here’s the section of the post that is generating the error:

    “@context”: “https://schema.org”,
    “@type”: “BlogPosting”,
    “mainEntityOfPage”: {
    “@type”: “WebPage”,
    “@id”: “http:/website.com/post-name/”

    The error generated is on the “ID”
    Error message: “is not a known valid target type for the identifier property”

    I definitely don’t know schema, but after reading Schema.org for Blogposting, I’m wondering if the problem is “mainEntityOfPage” which appears to be used for “Articles” and not “blogposting”.

    It appears that this should be “mainEntity” instead of “mainEntityOfPage”, but I’m not sure. Here’s the pages I was looking at:

    https://schema.org/BlogPosting
    https://schema.org/mainEntity

    I love your plugin! It definitely does a wonderful job of inserting the structured data.

    Thank you for your help!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author miiitaka

    (@miiitaka)

    Hi @lmoffen,

    BreadcrumbList Do not set schema.org? It seems useless to specify the current page ID. Correct it so that it can be displayed / hidden.

    Thank you.

    Thread Starter lmoffen

    (@lmoffen)

    I’m not referring to “breadcrumblist”.

    It appears that “mainEntityOfPage” is NOT acceptable if you are using the type “BlogPosting”.

    I believe that “mainEntity” INSTEAD of “mainEntityOfPage” should be used when the type is labelled as “BlogPosting”.

    Google Structured Data testing does NOT like “mainEntityOfPage” for “BlogPosting”

    Plugin Author miiitaka

    (@miiitaka)

    Please test your page with code snippets.
    Strange to say the error was not.
    Since there is no error in SearchConsole, I think that there is no problem.

    I think it is a problem of structured test tool.

    I am getting this same error on my BlogPosting, Article and BreadcrumbList.

    It appears to be coming from the “@id”: “http:/website.com/post-name/”

    error says:
    is not a known valid target type for the identifier property.

    FYI, I found a discussion on another site that said:

    “If the page itself is the mainentityofpage, the @id (URL) of the page is always marked with error now (not before). To avoid this error, add a “#” after the @id (URL).”

    I added an anchor to the end of the URL in the structured data testing tool and re-validated and it solved the error.

    Not sure how to make the plugin do that automatically.

    Great plugin btw. I tried a few Schema plugins and this one is by far my favorite.

    Thread Starter lmoffen

    (@lmoffen)

    accdocsol – I just tried adding the “#” after the URL and ran the test again. Your right, it worked. No more errors.

    For now, I’ll not worry about that error.

    I agree, this is a great plugin!

    Thread Starter lmoffen

    (@lmoffen)

    Forgot to mention –

    When I log into my Google Search Console, it shows NO errors for any of my post’s structured data.

    When I run the test using “https://search.google.com/structured-data/testing-tool”, it does show that error.

    That’s really strange.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Blogposting – Error – not a known valid target type’ is closed to new replies.