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

Adjust the JSON-LD data in the default indexer test #1493

Merged
merged 2 commits into from Mar 6, 2020

Conversation

@leofeyer
Copy link
Member

leofeyer commented Mar 5, 2020

Q A
Fixed issues -
Docs PR or issue -

After adding the context prefixes to the JSON-LD keys in #1457, we did not adjust the HTML markup in the DefaultIndexerTest class. Unfortunately, the unit tests now fail.

@leofeyer leofeyer added the defect label Mar 5, 2020
@leofeyer leofeyer added this to the 4.9 milestone Mar 5, 2020
@leofeyer leofeyer requested review from ausi and Toflar Mar 5, 2020
@leofeyer leofeyer self-assigned this Mar 5, 2020
@ausi

This comment has been minimized.

Copy link
Member

ausi commented Mar 5, 2020

Should be fixed with 3bebb6b 🙃

@leofeyer

This comment has been minimized.

Copy link
Member Author

leofeyer commented Mar 6, 2020

Thank you @ausi. Before I merge this, I want to make sure that the following is correct:

$jsonLds = $document->extractJsonLdScripts('https://schema.contao.org/', 'RegularPage');

We are passing RegularPage as type here and not contao:RegularPage. Should this be changed?

@ausi

This comment has been minimized.

Copy link
Member

ausi commented Mar 6, 2020

We are passing RegularPage as type here and not contao:RegularPage. Should this be changed?

No, this is correct. The name of the contao prefix is not relevant to what the data actually represents. E. g. this would (and should) work too:

{
	"@context": {
		"foo": "https://schema.contao.org/"
	},
	"@type": "foo:RegularPage"
}
@ausi
ausi approved these changes Mar 6, 2020
@issue-bot issue-bot merged commit e539cfd into contao:4.9 Mar 6, 2020
8 checks passed
8 checks passed
Coverage
Details
Coding Style
Details
PHP 7.2
Details
PHP 7.3
Details
PHP 7.4
Details
Prefer Lowest
Details
Bundles
Details
Windows
Details
@leofeyer leofeyer deleted the leofeyer:fix/json-ld branch Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.