diff --git a/core/modules/book/src/BookManager.php b/core/modules/book/src/BookManager.php index 17bc0d9..eb5b582 100644 --- a/core/modules/book/src/BookManager.php +++ b/core/modules/book/src/BookManager.php @@ -252,7 +252,7 @@ public function updateOutline(NodeInterface $node) { // Prevent changes to the book outline if the node being saved is not the // default revision. if (!$node->isDefaultRevision()) { - drupal_set_message($this->t('The book outline could not be changed because a non-default revision (for example: a new draft revision) of the content has been created.'), 'error'); + drupal_set_message($this->t('You can only change the book outline for the published version of this content.'), 'error'); return FALSE; } diff --git a/core/modules/book/tests/src/Functional/BookContentModerationTest.php b/core/modules/book/tests/src/Functional/BookContentModerationTest.php index 5b5fe34..0b9c831 100644 --- a/core/modules/book/tests/src/Functional/BookContentModerationTest.php +++ b/core/modules/book/tests/src/Functional/BookContentModerationTest.php @@ -60,7 +60,7 @@ public function testBookWithForwardRevisions() { $edit['book[pid]'] = $book_1_nodes[3]->id(); $this->drupalPostForm('node/' . $book_1_nodes[1]->id() . '/edit', $edit, t('Save and Create New Draft')); - $this->assertSession()->pageTextContains('The book outline could not be changed because a non-default revision (for example: a new draft revision) of the content has been created.'); + $this->assertSession()->pageTextContains('You can only change the book outline for the published version of this content.'); // Check that the book outline did not change. $this->book = $book_1; @@ -71,7 +71,7 @@ public function testBookWithForwardRevisions() { $edit['book[bid]'] = $book_2->id(); $this->drupalPostForm('node/' . $book_1_nodes[1]->id() . '/edit', $edit, t('Save and Create New Draft')); - $this->assertSession()->pageTextContains('The book outline could not be changed because a non-default revision (for example: a new draft revision) of the content has been created.'); + $this->assertSession()->pageTextContains('You can only change the book outline for the published version of this content.'); // Check that the book outline did not change. $this->book = $book_1; diff --git a/core/modules/book/tests/src/Functional/BookTest.php b/core/modules/book/tests/src/Functional/BookTest.php index df19242..640859f 100644 --- a/core/modules/book/tests/src/Functional/BookTest.php +++ b/core/modules/book/tests/src/Functional/BookTest.php @@ -23,20 +23,6 @@ class BookTest extends BrowserTestBase { public static $modules = ['book', 'block', 'node_access_test', 'book_test']; /** - * A book node. - * - * @var \Drupal\node\NodeInterface - */ - protected $book; - - /** - * A user with permission to create and edit books. - * - * @var object - */ - protected $bookAuthor; - - /** * A user with permission to view a book and access printer-friendly version. * * @var object