When using a code component with a prop of image or video you cannot publish a page using the default prop values. If you do, you get:
Error 500: Extraneous JSON Schema information detected: { "properties": { "src": { "type": "string", "format": "uri-reference", "pattern": "^(\/|https?:\/\/)?(?!.*\\:\/\/)[^\\s]+$", "contentMediaType": "video\/*" }, "poster": { "type": "string", "format": "uri-reference", "pattern": "^(\/|https?:\/\/)?(?!.*\\:\/\/)[^\\s]+$", "contentMediaType": "image\/*" } }, "required": [ "src" ], "type": "object" } should have been just { "properties": { "src": { "type": "string", "contentMediaType": "video\/*", "format": "uri-reference", "pattern": "^(\/|https?:\/\/)?(?!.*\\:\/\/)[^\\s]+$" }, "poster": { "type": "string", "contentMediaType": "image\/*", "format": "uri-reference", "pattern": "^(\/|https?:\/\/)?(?!.*\\:\/\/)[^\\s]+$" } }, "required": [ "src" ], "type": "object" }.
That's because the comparison logic doesn't sort recursively through the JSON schema.
ksort($sdc_prop_source['jsonSchema']);
ksort($minimal);
if ($sdc_prop_source['jsonSchema'] !== $minimal) {
The properties keys are not sorted the same.
Drupal doesn't have a recursive ksort, so hack it like
ksort($sdc_prop_source['jsonSchema']);
foreach (array_keys($sdc_prop_source['jsonSchema']['properties']) as $property_key) {
ksort($sdc_prop_source['jsonSchema']['properties'][$property_key]);
}
ksort($minimal);
foreach (array_keys($minimal['properties']) as $property_key) {
ksort($minimal['properties'][$property_key]);
}
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.