diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php index 0ce499caff6..ce186bef86e 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php @@ -256,9 +256,11 @@ class ContentEntityDatabaseStorage extends ContentEntityStorageBase implements S // log. // @todo Provide automatic definitions for revision metadata fields in // https://drupal.org/node/2248983. - // @todo Rename 'log' to 'revision_log' in - // https://drupal.org/node/2248991. - $revision_metadata_fields = array_intersect(array('revision_timestamp', 'revision_uid', 'log'), $all_fields); + $revision_metadata_fields = array_intersect(array( + 'revision_timestamp', + 'revision_uid', + 'revision_log', + ), $all_fields); $revisionable = $this->entityType->isRevisionable(); // @todo Remove the data table check once all entity types are using diff --git a/core/modules/block/custom_block/js/custom_block.js b/core/modules/block/custom_block/js/custom_block.js index be0ea7d1d03..8ea33647b12 100644 --- a/core/modules/block/custom_block/js/custom_block.js +++ b/core/modules/block/custom_block/js/custom_block.js @@ -18,7 +18,7 @@ // or if the checkbox doesn't exist, but the revision log does. For users // without the "Administer content" permission the checkbox won't appear, // but the revision log will if the content type is set to auto-revision. - if (revisionCheckbox.is(':checked') || (!revisionCheckbox.length && $context.find('.form-item-log textarea').length)) { + if (revisionCheckbox.is(':checked') || (!revisionCheckbox.length && $context.find('.form-item-revision-log textarea').length)) { return Drupal.t('New revision'); } diff --git a/core/modules/block/custom_block/src/CustomBlockForm.php b/core/modules/block/custom_block/src/CustomBlockForm.php index f495c4f3460..30f5342d875 100644 --- a/core/modules/block/custom_block/src/CustomBlockForm.php +++ b/core/modules/block/custom_block/src/CustomBlockForm.php @@ -150,12 +150,12 @@ class CustomBlockForm extends ContentEntityForm { if (!$block->isNewRevision()) { $form['revision_information']['revision']['#states'] = array( 'checked' => array( - 'textarea[name="log"]' => array('empty' => FALSE), + 'textarea[name="revision_log"]' => array('empty' => FALSE), ), ); } - $form['revision_information']['log'] = array( + $form['revision_information']['revision_log'] = array( '#type' => 'textarea', '#title' => $this->t('Revision log message'), '#rows' => 4, diff --git a/core/modules/block/custom_block/src/CustomBlockInterface.php b/core/modules/block/custom_block/src/CustomBlockInterface.php index 00cac2c9694..d6ef5d58fd5 100644 --- a/core/modules/block/custom_block/src/CustomBlockInterface.php +++ b/core/modules/block/custom_block/src/CustomBlockInterface.php @@ -37,13 +37,13 @@ interface CustomBlockInterface extends ContentEntityInterface, EntityChangedInte /** * Sets the block revision log message. * - * @param string $log + * @param string $revision_log * The revision log message. * * @return \Drupal\custom_block\CustomBlockInterface * The class instance that this method is called on. */ - public function setRevisionLog($log); + public function setRevisionLog($revision_log); /** * Sets the theme value. diff --git a/core/modules/block/custom_block/src/Entity/CustomBlock.php b/core/modules/block/custom_block/src/Entity/CustomBlock.php index 53e58b40687..a91e01ebb97 100644 --- a/core/modules/block/custom_block/src/Entity/CustomBlock.php +++ b/core/modules/block/custom_block/src/Entity/CustomBlock.php @@ -115,23 +115,11 @@ class CustomBlock extends ContentEntityBase implements CustomBlockInterface { public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record) { parent::preSaveRevision($storage, $record); - if ($this->isNewRevision()) { - // When inserting either a new custom block or a new custom_block - // revision, $entity->log must be set because {block_custom_revision}.log - // is a text column and therefore cannot have a default value. However, - // it might not be set at this point (for example, if the user submitting - // the form does not have permission to create revisions), so we ensure - // that it is at least an empty string in that case. - // @todo: Make the {block_custom_revision}.log column nullable so that we - // can remove this check. - if (!isset($record->log)) { - $record->log = ''; - } - } - elseif (isset($this->original) && (!isset($record->log) || $record->log === '')) { + if (!$this->isNewRevision() && isset($this->original) && (!isset($record->revision_log) || $record->revision_log === '')) { // If we are updating an existing custom_block without adding a new - // revision and the user did not supply a log, keep the existing one. - $record->log = $this->original->getRevisionLog(); + // revision and the user did not supply a revision log, keep the existing + // one. + $record->revision_log = $this->original->getRevisionLog(); } } @@ -186,9 +174,9 @@ class CustomBlock extends ContentEntityBase implements CustomBlockInterface { ->setDescription(t('The block type.')) ->setSetting('target_type', 'custom_block_type'); - $fields['log'] = FieldDefinition::create('string_long') + $fields['revision_log'] = FieldDefinition::create('string_long') ->setLabel(t('Revision log message')) - ->setDescription(t('The revision log message.')) + ->setDescription(t('The log entry explaining the changes in this revision.')) ->setRevisionable(TRUE); $fields['changed'] = FieldDefinition::create('changed') @@ -210,7 +198,7 @@ class CustomBlock extends ContentEntityBase implements CustomBlockInterface { * {@inheritdoc} */ public function getRevisionLog() { - return $this->get('log')->value; + return $this->get('revision_log')->value; } /** @@ -224,8 +212,8 @@ class CustomBlock extends ContentEntityBase implements CustomBlockInterface { /** * {@inheritdoc} */ - public function setRevisionLog($log) { - $this->set('log', $log); + public function setRevisionLog($revision_log) { + $this->set('revision_log', $revision_log); return $this; } diff --git a/core/modules/block/custom_block/src/Tests/CustomBlockRevisionsTest.php b/core/modules/block/custom_block/src/Tests/CustomBlockRevisionsTest.php index 75f19aa7ea6..b2be3c491f5 100644 --- a/core/modules/block/custom_block/src/Tests/CustomBlockRevisionsTest.php +++ b/core/modules/block/custom_block/src/Tests/CustomBlockRevisionsTest.php @@ -22,7 +22,7 @@ class CustomBlockRevisionsTest extends CustomBlockTestBase { * Stores log messages used during the test. * @var array */ - protected $logs; + protected $revisionLogs; /** * Declares test information. @@ -62,7 +62,7 @@ class CustomBlockRevisionsTest extends CustomBlockTestBase { } $this->blocks = $blocks; - $this->logs = $logs; + $this->revisionLogs = $logs; } /** @@ -70,12 +70,12 @@ class CustomBlockRevisionsTest extends CustomBlockTestBase { */ public function testRevisions() { $blocks = $this->blocks; - $logs = $this->logs; + $logs = $this->revisionLogs; foreach ($blocks as $delta => $revision_id) { // Confirm the correct revision text appears. $loaded = entity_revision_load('custom_block', $revision_id); - // Verify log is the same. + // Verify revision log is the same. $this->assertEqual($loaded->getRevisionLog(), $logs[$delta], format_string('Correct log message found for revision !revision', array( '!revision' => $loaded->getRevisionId(), ))); diff --git a/core/modules/book/src/Form/BookAdminEditForm.php b/core/modules/book/src/Form/BookAdminEditForm.php index f76fe9045ea..f52c2e4c163 100644 --- a/core/modules/book/src/Form/BookAdminEditForm.php +++ b/core/modules/book/src/Form/BookAdminEditForm.php @@ -114,7 +114,7 @@ class BookAdminEditForm extends FormBase { // Update the title if changed. if ($row['title']['#default_value'] != $values['title']) { $node = $this->nodeStorage->load($values['nid']); - $node->log = $this->t('Title changed from %original to %current.', array('%original' => $node->label(), '%current' => $values['title'])); + $node->revision_log = $this->t('Title changed from %original to %current.', array('%original' => $node->label(), '%current' => $values['title'])); $node->title = $values['title']; $node->book['link_title'] = $values['title']; $node->setNewRevision(); diff --git a/core/modules/node/node.js b/core/modules/node/node.js index 2ae5d5af04e..7e088ef12e6 100644 --- a/core/modules/node/node.js +++ b/core/modules/node/node.js @@ -18,7 +18,7 @@ // or if the checkbox doesn't exist, but the revision log does. For users // without the "Administer content" permission the checkbox won't appear, // but the revision log will if the content type is set to auto-revision. - if (revisionCheckbox.is(':checked') || (!revisionCheckbox.length && $context.find('.form-item-log textarea').length)) { + if (revisionCheckbox.is(':checked') || (!revisionCheckbox.length && $context.find('.form-item-revision-log textarea').length)) { return Drupal.t('New revision'); } diff --git a/core/modules/node/node.views.inc b/core/modules/node/node.views.inc index 6e745dd578d..b4ef77cc74e 100644 --- a/core/modules/node/node.views.inc +++ b/core/modules/node/node.views.inc @@ -483,7 +483,7 @@ function node_views_data() { ); } - $data['node_revision']['log'] = array( + $data['node_revision']['revision_log'] = array( 'title' => t('Log message'), 'help' => t('The log message entered when the revision was created.'), 'field' => array( diff --git a/core/modules/node/src/Controller/NodeController.php b/core/modules/node/src/Controller/NodeController.php index e20399a0726..812a3f8e9ff 100644 --- a/core/modules/node/src/Controller/NodeController.php +++ b/core/modules/node/src/Controller/NodeController.php @@ -185,7 +185,7 @@ class NodeController extends ControllerBase implements ContainerInjectionInterfa '#account' => $revision_author, ); $row[] = array('data' => $this->t('!date by !username', array('!date' => $this->l($this->date->format($revision->revision_timestamp->value, 'short'), 'node.view', array('node' => $node->id())), '!username' => drupal_render($username))) - . (($revision->log->value != '') ? '

' . Xss::filter($revision->log->value) . '

' : ''), + . (($revision->revision_log->value != '') ? '

' . Xss::filter($revision->revision_log->value) . '

' : ''), 'class' => array('revision-current')); $row[] = array('data' => String::placeholder($this->t('current revision')), 'class' => array('revision-current')); } @@ -195,7 +195,7 @@ class NodeController extends ControllerBase implements ContainerInjectionInterfa '#account' => $revision_author, ); $row[] = $this->t('!date by !username', array('!date' => $this->l($this->date->format($revision->revision_timestamp->value, 'short'), 'node.revision_show', array('node' => $node->id(), 'node_revision' => $vid)), '!username' => drupal_render($username))) - . (($revision->log->value != '') ? '

' . Xss::filter($revision->log->value) . '

' : ''); + . (($revision->revision_log->value != '') ? '

' . Xss::filter($revision->revision_log->value) . '

' : ''); if ($revert_permission) { $links['revert'] = array( diff --git a/core/modules/node/src/Entity/Node.php b/core/modules/node/src/Entity/Node.php index 81b3ca25666..37979d25d45 100644 --- a/core/modules/node/src/Entity/Node.php +++ b/core/modules/node/src/Entity/Node.php @@ -85,25 +85,12 @@ class Node extends ContentEntityBase implements NodeInterface { public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record) { parent::preSaveRevision($storage, $record); - if ($this->newRevision) { - // When inserting either a new node or a new node revision, $node->log - // must be set because {node_field_revision}.log is a text column and - // therefore cannot have a default value. However, it might not be set at - // this point (for example, if the user submitting a node form does not - // have permission to create revisions), so we ensure that it is at least - // an empty string in that case. - // @todo Make the {node_field_revision}.log column nullable so that we - // can remove this check. - if (!isset($record->log)) { - $record->log = ''; - } - } - elseif (isset($this->original) && (!isset($record->log) || $record->log === '')) { + if (!$this->isNewRevision() && isset($this->original) && (!isset($record->revision_log) || $record->revision_log === '')) { // If we are updating an existing node without adding a new revision, we - // need to make sure $entity->log is reset whenever it is empty. + // need to make sure $entity->revision_log is reset whenever it is empty. // Therefore, this code allows us to avoid clobbering an existing log // entry with an empty one. - $record->log = $this->original->log->value; + $record->revision_log = $this->original->revision_log->value; } } @@ -433,8 +420,8 @@ class Node extends ContentEntityBase implements NodeInterface { ->setQueryable(FALSE) ->setRevisionable(TRUE); - $fields['log'] = FieldDefinition::create('string_long') - ->setLabel(t('Log')) + $fields['revision_log'] = FieldDefinition::create('string_long') + ->setLabel(t('Revision log message')) ->setDescription(t('The log entry explaining the changes in this revision.')) ->setRevisionable(TRUE) ->setTranslatable(TRUE); diff --git a/core/modules/node/src/Form/NodeRevisionRevertForm.php b/core/modules/node/src/Form/NodeRevisionRevertForm.php index b0d717d5654..335e3a13716 100644 --- a/core/modules/node/src/Form/NodeRevisionRevertForm.php +++ b/core/modules/node/src/Form/NodeRevisionRevertForm.php @@ -108,7 +108,7 @@ class NodeRevisionRevertForm extends ConfirmFormBase { // original one for the confirmation message. $original_revision_timestamp = $this->revision->getRevisionCreationTime(); - $this->revision->log = t('Copy of the revision from %date.', array('%date' => format_date($original_revision_timestamp))); + $this->revision->revision_log = t('Copy of the revision from %date.', array('%date' => format_date($original_revision_timestamp))); $this->revision->save(); diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php index f15b77e69e2..70686bee91f 100644 --- a/core/modules/node/src/NodeForm.php +++ b/core/modules/node/src/NodeForm.php @@ -38,8 +38,8 @@ class NodeForm extends ContentEntityForm { if (!$node->isNew()) { $node->date = format_date($node->getCreatedTime(), 'custom', 'Y-m-d H:i:s O'); - // Remove the log message from the original node entity. - $node->log = NULL; + // Remove the revision log message from the original node entity. + $node->revision_log = NULL; } } @@ -91,8 +91,8 @@ class NodeForm extends ContentEntityForm { '#weight' => 99, ); - // Add a log field if the "Create new revision" option is checked, or if - // the current user has the ability to check that option. + // Add a revision log field if the "Create new revision" option is checked, + // or if the current user has the ability to check that option. $form['revision_information'] = array( '#type' => 'details', '#group' => 'advanced', @@ -117,11 +117,11 @@ class NodeForm extends ContentEntityForm { '#group' => 'revision_information', ); - $form['log'] = array( + $form['revision_log'] = array( '#type' => 'textarea', '#title' => t('Revision log message'), '#rows' => 4, - '#default_value' => !empty($node->log->value) ? $node->log->value : '', + '#default_value' => !empty($node->revision_log->value) ? $node->revision_log->value : '', '#description' => t('Briefly describe the changes you have made.'), '#states' => array( 'visible' => array( diff --git a/core/modules/node/src/Tests/NodeRevisionPermissionsTest.php b/core/modules/node/src/Tests/NodeRevisionPermissionsTest.php index 5c7130bb3fb..b3e48eff048 100644 --- a/core/modules/node/src/Tests/NodeRevisionPermissionsTest.php +++ b/core/modules/node/src/Tests/NodeRevisionPermissionsTest.php @@ -50,7 +50,7 @@ class NodeRevisionPermissionsTest extends NodeTestBase { // Create a revision for the same nid and settings with a random log. $revision = clone $nodes[$type]; $revision->setNewRevision(); - $revision->log = $this->randomName(32); + $revision->revision_log = $this->randomName(32); $revision->save(); $this->node_revisions[$type][] = $revision; } diff --git a/core/modules/node/src/Tests/NodeRevisionsAllTestCase.php b/core/modules/node/src/Tests/NodeRevisionsAllTestCase.php index abc6668779e..e7374d32147 100644 --- a/core/modules/node/src/Tests/NodeRevisionsAllTestCase.php +++ b/core/modules/node/src/Tests/NodeRevisionsAllTestCase.php @@ -14,7 +14,7 @@ use Drupal\Core\Language\Language; */ class NodeRevisionsAllTestCase extends NodeTestBase { protected $nodes; - protected $logs; + protected $revisionLogs; protected $profile = "standard"; public static function getInfo() { @@ -55,7 +55,7 @@ class NodeRevisionsAllTestCase extends NodeTestBase { // Create three revisions. $revision_count = 3; for ($i = 0; $i < $revision_count; $i++) { - $logs[] = $node->log = $this->randomName(32); + $logs[] = $node->revision_log = $this->randomName(32); // Create revision with a random title and body and update variables. $node->title = $this->randomName(); @@ -71,7 +71,7 @@ class NodeRevisionsAllTestCase extends NodeTestBase { } $this->nodes = $nodes; - $this->logs = $logs; + $this->revisionLogs = $logs; } /** @@ -79,7 +79,7 @@ class NodeRevisionsAllTestCase extends NodeTestBase { */ function testRevisions() { $nodes = $this->nodes; - $logs = $this->logs; + $logs = $this->revisionLogs; // Get last node for simple checks. $node = $nodes[3]; @@ -100,10 +100,11 @@ class NodeRevisionsAllTestCase extends NodeTestBase { $this->drupalGet("node/" . $node->id() . "/revisions/" . $node->getRevisionId() . "/view"); $this->assertText($node->body->value, 'Correct text displays for version.'); - // Confirm the correct log message appears on "revisions overview" page. + // Confirm the correct revision log message appears on the "revisions + // overview" page. $this->drupalGet("node/" . $node->id() . "/revisions"); - foreach ($logs as $log) { - $this->assertText($log, 'Log message found.'); + foreach ($logs as $revision_log) { + $this->assertText($revision_log, 'Revision log message found.'); } // Confirm that this is the current revision. diff --git a/core/modules/node/src/Tests/NodeRevisionsTest.php b/core/modules/node/src/Tests/NodeRevisionsTest.php index bcb62fc8437..41baff6dec4 100644 --- a/core/modules/node/src/Tests/NodeRevisionsTest.php +++ b/core/modules/node/src/Tests/NodeRevisionsTest.php @@ -14,7 +14,7 @@ use Drupal\Core\Language\Language; */ class NodeRevisionsTest extends NodeTestBase { protected $nodes; - protected $logs; + protected $revisionLogs; public static function getInfo() { return array( @@ -55,7 +55,7 @@ class NodeRevisionsTest extends NodeTestBase { // Create three revisions. $revision_count = 3; for ($i = 0; $i < $revision_count; $i++) { - $logs[] = $node->log = $this->randomName(32); + $logs[] = $node->revision_log = $this->randomName(32); // Create revision with a random title and body and update variables. $node->title = $this->randomName(); @@ -71,7 +71,7 @@ class NodeRevisionsTest extends NodeTestBase { } $this->nodes = $nodes; - $this->logs = $logs; + $this->revisionLogs = $logs; } /** @@ -79,7 +79,7 @@ class NodeRevisionsTest extends NodeTestBase { */ function testRevisions() { $nodes = $this->nodes; - $logs = $this->logs; + $logs = $this->revisionLogs; // Get last node for simple checks. $node = $nodes[3]; @@ -90,8 +90,8 @@ class NodeRevisionsTest extends NodeTestBase { // Confirm the correct log message appears on "revisions overview" page. $this->drupalGet("node/" . $node->id() . "/revisions"); - foreach ($logs as $log) { - $this->assertText($log, 'Log message found.'); + foreach ($logs as $revision_log) { + $this->assertText($revision_log, 'Revision log message found.'); } // Confirm that this is the default revision. @@ -165,8 +165,8 @@ class NodeRevisionsTest extends NodeTestBase { */ function testNodeRevisionWithoutLogMessage() { // Create a node with an initial log message. - $log = $this->randomName(10); - $node = $this->drupalCreateNode(array('log' => $log)); + $revision_log = $this->randomName(10); + $node = $this->drupalCreateNode(array('revision_log' => $revision_log)); // Save over the same revision and explicitly provide an empty log message // (for example, to mimic the case of a node form submitted with no text in @@ -176,17 +176,17 @@ class NodeRevisionsTest extends NodeTestBase { $node = clone $node; $node->title = $new_title; - $node->log = ''; + $node->revision_log = ''; $node->setNewRevision(FALSE); $node->save(); $this->drupalGet('node/' . $node->id()); $this->assertText($new_title, 'New node title appears on the page.'); $node_revision = node_load($node->id(), TRUE); - $this->assertEqual($node_revision->log->value, $log, 'After an existing node revision is re-saved without a log message, the original log message is preserved.'); + $this->assertEqual($node_revision->revision_log->value, $revision_log, 'After an existing node revision is re-saved without a log message, the original log message is preserved.'); - // Create another node with an initial log message. - $node = $this->drupalCreateNode(array('log' => $log)); + // Create another node with an initial revision log message. + $node = $this->drupalCreateNode(array('revision_log' => $revision_log)); // Save a new node revision without providing a log message, and check that // this revision has an empty log message. @@ -195,12 +195,12 @@ class NodeRevisionsTest extends NodeTestBase { $node = clone $node; $node->title = $new_title; $node->setNewRevision(); - $node->log = NULL; + $node->revision_log = NULL; $node->save(); $this->drupalGet('node/' . $node->id()); $this->assertText($new_title, 'New node title appears on the page.'); $node_revision = node_load($node->id(), TRUE); - $this->assertTrue(empty($node_revision->log->value), 'After a new node revision is saved with an empty log message, the log message for the node is empty.'); + $this->assertTrue(empty($node_revision->revision_log->value), 'After a new node revision is saved with an empty log message, the log message for the node is empty.'); } } diff --git a/core/modules/node/src/Tests/PagePreviewTest.php b/core/modules/node/src/Tests/PagePreviewTest.php index 48a8ea60885..6086c313c6f 100644 --- a/core/modules/node/src/Tests/PagePreviewTest.php +++ b/core/modules/node/src/Tests/PagePreviewTest.php @@ -192,7 +192,7 @@ class PagePreviewTest extends NodeTestBase { $edit[$title_key] = $this->randomName(8); $edit[$body_key] = $this->randomName(16); $edit[$term_key] = $this->term->id(); - $edit['log'] = $this->randomName(32); + $edit['revision_log'] = $this->randomName(32); $this->drupalPostForm('node/add/page', $edit, t('Preview')); // Check that the preview is displaying the title, body and term. @@ -206,8 +206,8 @@ class PagePreviewTest extends NodeTestBase { $this->assertFieldByName($body_key, $edit[$body_key], 'Body field displayed.'); $this->assertFieldByName($term_key, $edit[$term_key], 'Term field displayed.'); - // Check that the log field has the correct value. - $this->assertFieldByName('log', $edit['log'], 'Log field displayed.'); + // Check that the revision log field has the correct value. + $this->assertFieldByName('revision_log', $edit['revision_log'], 'Revision log field displayed.'); } } diff --git a/core/modules/quickedit/src/Form/QuickEditFieldForm.php b/core/modules/quickedit/src/Form/QuickEditFieldForm.php index ae22614dbae..38b82a5454e 100644 --- a/core/modules/quickedit/src/Form/QuickEditFieldForm.php +++ b/core/modules/quickedit/src/Form/QuickEditFieldForm.php @@ -123,7 +123,7 @@ class QuickEditFieldForm extends FormBase { $node_type_settings = $this->nodeTypeStorage->load($entity->bundle())->getModuleSettings('node'); $options = (isset($node_type_settings['options'])) ? $node_type_settings['options'] : array(); $entity->setNewRevision(!empty($options['revision'])); - $entity->log = NULL; + $entity->revision_log = NULL; } $form_state['entity'] = $entity; @@ -186,8 +186,8 @@ class QuickEditFieldForm extends FormBase { // @todo Refine automated log messages and abstract them to all entity // types: http://drupal.org/node/1678002. - if ($entity->getEntityTypeId() == 'node' && $entity->isNewRevision() && !isset($entity->log)) { - $entity->log = t('Updated the %field-name field through in-place editing.', array('%field-name' => $entity->get($field_name)->getFieldDefinition()->getLabel())); + if ($entity->getEntityTypeId() == 'node' && $entity->isNewRevision() && !isset($entity->revision_log)) { + $entity->revision_log = t('Updated the %field-name field through in-place editing.', array('%field-name' => $entity->get($field_name)->getFieldDefinition()->getLabel())); } return $entity; diff --git a/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php b/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php index 220a14a4e4f..ad6b1f385d5 100644 --- a/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php +++ b/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php @@ -60,7 +60,7 @@ class QuickEditLoadingTest extends WebTestBase { 'format' => 'filtered_html', ) ), - 'log' => $this->randomString(), + 'revision_log' => $this->randomString(), )); // Create 2 users, the only difference being the ability to use in-place @@ -146,7 +146,7 @@ class QuickEditLoadingTest extends WebTestBase { $node = node_load(1); $vids = \Drupal::entityManager()->getStorage('node')->revisionIds($node); $this->assertIdentical(1, count($vids), 'The node has only one revision.'); - $original_log = $node->log->value; + $original_log = $node->revision_log->value; // Retrieving the metadata should result in a 200 JSON response. $htmlPageDrupalSettings = $this->drupalSettings; @@ -240,7 +240,7 @@ class QuickEditLoadingTest extends WebTestBase { $node = node_load(1); $vids = \Drupal::entityManager()->getStorage('node')->revisionIds($node); $this->assertIdentical(1, count($vids), 'The node has only one revision.'); - $this->assertIdentical($original_log, $node->log->value, 'The revision log message is unchanged.'); + $this->assertIdentical($original_log, $node->revision_log->value, 'The revision log message is unchanged.'); // Now configure this node type to create new revisions automatically, // then again retrieve the field form, fill it, submit it (so it ends up @@ -289,9 +289,9 @@ class QuickEditLoadingTest extends WebTestBase { $vids = \Drupal::entityManager()->getStorage('node')->revisionIds(node_load(1)); $this->assertIdentical(2, count($vids), 'The node has two revisions.'); $revision = node_revision_load($vids[0]); - $this->assertIdentical($original_log, $revision->log->value, 'The first revision log message is unchanged.'); + $this->assertIdentical($original_log, $revision->revision_log->value, 'The first revision log message is unchanged.'); $revision = node_revision_load($vids[1]); - $this->assertIdentical('Updated the Body field through in-place editing.', $revision->log->value, 'The second revision log message was correctly generated by Quick Edit module.'); + $this->assertIdentical('Updated the Body field through in-place editing.', $revision->revision_log->value, 'The second revision log message was correctly generated by Quick Edit module.'); } } diff --git a/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php index fc095b5d792..0b8f6e2d2a3 100644 --- a/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php @@ -490,11 +490,11 @@ class ContentEntityDatabaseStorageTest extends UnitTestCase { array(), array('revision_timestamp'), array('revision_uid'), - array('log'), + array('revision_log'), array('revision_timestamp', 'revision_uid'), - array('revision_timestamp', 'log'), - array('revision_uid', 'log'), - array('revision_timestamp', 'revision_uid', 'log'), + array('revision_timestamp', 'revision_log'), + array('revision_uid', 'revision_log'), + array('revision_timestamp', 'revision_uid', 'revision_log'), ); foreach ($test_cases as $revision_metadata_field_names) { $this->setUp(); @@ -797,11 +797,11 @@ class ContentEntityDatabaseStorageTest extends UnitTestCase { array(), array('revision_timestamp'), array('revision_uid'), - array('log'), + array('revision_log'), array('revision_timestamp', 'revision_uid'), - array('revision_timestamp', 'log'), - array('revision_uid', 'log'), - array('revision_timestamp', 'revision_uid', 'log'), + array('revision_timestamp', 'revision_log'), + array('revision_uid', 'revision_log'), + array('revision_timestamp', 'revision_uid', 'revision_log'), ); foreach ($test_cases as $revision_metadata_field_names) { $this->setUp();