diff --git a/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityNormalizer.php b/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityNormalizer.php index 5fb5afb..c466952 100644 --- a/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityNormalizer.php +++ b/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityNormalizer.php @@ -57,7 +57,7 @@ public function denormalize($data, $class, $format = null) { ); // If the data specifies a default language, use it to create the entity. if (isset($data['langcode'])) { - $values['langcode'] = $data['langcode']; + $values['langcode'] = $data['langcode'][LANGUAGE_NOT_SPECIFIED][0]['value']; } // Otherwise, if the default language is not specified but there are // translations of field values, explicitly set the entity's default diff --git a/core/modules/jsonld/tests/modules/jsonld_test/jsonld_test.routing.yml b/core/modules/jsonld/tests/modules/jsonld_test/jsonld_test.routing.yml index d02494d..e1584f5 100644 --- a/core/modules/jsonld/tests/modules/jsonld_test/jsonld_test.routing.yml +++ b/core/modules/jsonld/tests/modules/jsonld_test/jsonld_test.routing.yml @@ -2,3 +2,5 @@ jsonld_test_bundle_schema: pattern: 'jsonld-test/content-staging/entity_test/entity_test' defaults: _controller: 'Drupal\jsonld_test\MockSiteSchema::bundle' + requirements: + _access: 'TRUE'