diff --git a/core/modules/node/src/Entity/Node.php b/core/modules/node/src/Entity/Node.php index 9e865b7..b009e67 100644 --- a/core/modules/node/src/Entity/Node.php +++ b/core/modules/node/src/Entity/Node.php @@ -389,10 +389,6 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { )) ->setDisplayConfigurable('form', TRUE); - $fields['revision_timestamp']->setQueryable(FALSE); - - $fields['revision_uid']->setQueryable(FALSE); - $fields['revision_translation_affected'] = BaseFieldDefinition::create('boolean') ->setLabel(t('Revision translation affected')) ->setDescription(t('Indicates if the last edit of a translation belongs to current revision.')) diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php index 85e4ef0..f7ae7df 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -827,10 +827,10 @@ public function testPatch() { $response = $this->request('PATCH', $url, $request_options); $this->assertResourceErrorResponse(403, "Access denied on updating field 'field_rest_test'.", $response); + // DX: 403 when sending PATCH request with read-only fields. foreach (static::$patchProtectedFieldNames as $field_name) { - $this->entity->{$field_name}->generateSampleItems(); - $normalization = $this->getNormalizedPatchEntity() + [$field_name => $this->entity->{$field_name}->getValue()]; + $normalization = $this->getNormalizedPatchEntity() + [$field_name => [['value' => $this->randomString()]]]; $request_options[RequestOptions::BODY] = $this->serializer->serialize($normalization, static::$format); $response = $this->request('PATCH', $url, $request_options); $this->assertResourceErrorResponse(403, "Access denied on updating field '$field_name'.", $response);