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

[5.1] Load Schema.org only in proper forms #42825

Open
wants to merge 10 commits into
base: 5.1-dev
Choose a base branch
from
6 changes: 5 additions & 1 deletion plugins/system/schemaorg/src/Extension/Schemaorg.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,10 @@ protected function isSupported($context)
$parts = explode('.', $context, 2);
$component = $this->getApplication()->bootComponent($parts[0]);

return $component instanceof SchemaorgServiceInterface;
if ($component instanceof SchemaorgServiceInterface) {
return \in_array($context, array_keys($component->getSchemaorgContexts()));
}

return false;
}
}