The about link of the entity is rendered in the final like this:

<div vocab="http://schema.org" class="entity" about="/abc/def" typeof="LocalBusiness">

The google structured data testing tool interprets this as
https://developers.google.com/structured-data/testing-tool/

LocalBusiness: http://www.example.com/abc/def

if the link would have the target as absolute it would render just fine

<div vocab="http://schema.org" class="entity" about="http://mysite.com/abc/def" typeof="LocalBusiness">

Comments

k_zoltan’s picture

Tried to change the url to absolute in the schemaorg_entity_view function but without success.

k_zoltan’s picture

Saw this in the schemaorg_ui.module

    // Sets the mapping for the url of the entity. This mapping is always set
    // to schema:url and is not exposed in the UI.
    if ($entity_type != 'profile2') {
      $mapping['url']['predicates'] = array('schema:url');
      $mapping['url']['type'] = 'rel';
    }

isn't this the problem? How can I say to add the absolute link?

scor’s picture

I'm not sure I understand what the problem is. There should be no need to have the about attribute URL as absolute because when your webpage is parsed, it is always at your website URL, so Google or any search engine will build the URL as your website + the value of @about. I think what you are saying is that you would like to test your markup by copy-pasting it in the Google testing tool? In this case, because Google doesn't know what your site will be, it will default to example.com to build the URLs. This is fine, since this is only testing. When you publish your site online, it will automatically get the real URL correctly using your website URL.

Does my answer help in any way?

k_zoltan’s picture

Status: Active » Closed (works as designed)

Thanks for the fast response.
Now I understand.

This testing tool drives me crazy. I had the situation that my site had implemented RDF-A but while fetching the site with the testing tool it didn't recognized my structured data. I added as JSON-LD then it was ok. Now when I look at it in the Webmaster tools now every page has the data 2x.

Thanks again for your help.
I think it can be marked as solved and works as designed.