Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON-LD validation errors #1249

Closed
Falteri opened this issue Apr 29, 2018 · 9 comments
Closed

JSON-LD validation errors #1249

Falteri opened this issue Apr 29, 2018 · 9 comments
Milestone

Comments

@Falteri
Copy link

Falteri commented Apr 29, 2018

Seems to be some validation errors in JSON-LD data exoposed by item show.
Please check: https://search.google.com/structured-data/testing-tool?hl=en#url=http%3A%2F%2Fengb.bmlonline.it%2Fs%2Fcasa-boccaccio%2Fitem%2F370
Most of the errors are related with @type declarations and values but i get also an unspecified "There was an invalid type in your JSON-LD." error related with @context.

@akuckartz
Copy link

The tool reports a "URL was not found" error.

@Falteri
Copy link
Author

Falteri commented Apr 30, 2018

You are right: the structured-data testing tool provided by google doesn't work anymore. I do not why ...
I'll try later or with another similar validator and I'll give you a feedback asap. Thanks!

@zerocrates
Copy link
Member

I don't have any issue getting the tool to work, but at least most of the errors seem spurious... Google's tool is understandably very focused on showing you what Google is looking for, and it doesn't understand or care about Omeka's types or even the Dublin Core ones (it's looking for schema.org stuff, mostly).

@Falteri
Copy link
Author

Falteri commented May 1, 2018 via email

@Daniel-KM
Copy link
Contributor

Daniel-KM commented Jun 5, 2018

When we copy-paste a json-ld item from the /api/items/# on https://json-ld.org/playground/, it doesn't validate:

jsonld.InvalidUrl: Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.

Of course, all the urls are accessible and there is no cors issue.

@zerocrates
Copy link
Member

You could still get that error (based on CORS) if the playground can't load the @context, which would be a URL even if the content is pasted.

@Daniel-KM
Copy link
Contributor

Ok, it should be related to my server. Nevertheless, when I try the sandbox, there are issue too : http://tinyurl.com/yaxvupzy.

jsonld.SyntaxError: Invalid JSON-LD syntax; a term definition must not contain vocabulary_id

@zerocrates
Copy link
Member

Hmm, that's interesting, that's definitely a newer restriction on their end.

@zerocrates
Copy link
Member

That turns out to be a SHOULD NOT in the spec, so its somewhat dubious that they're now considering it a syntax error when they didn't before... but that data also isn't really crucial for us to include there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants