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

References broken between separate script tags #57

Open
Sarke opened this issue May 21, 2020 · 0 comments
Open

References broken between separate script tags #57

Sarke opened this issue May 21, 2020 · 0 comments

Comments

@Sarke
Copy link
Contributor

Sarke commented May 21, 2020

I ran into this problem with the New York Times. They have the NewsArticle and the NewsMediaOrganization in separate tags, and because of the way Jkphl\Micrometa\Infrastructure\Parser\JsonLD parses them separately with ML\JsonLD\JsonLD, the latter is not able to resolve the references across tags, (for example in this case the publication).

My solution was to rewrite Jkphl\Micrometa\Infrastructure\Parser\JsonLD::parseDom() to collect the schema in one root node, and send that off to ML\JsonLD\JsonLD once.

I don't have time to do a PR tonight, but I will eventually.

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

1 participant