diff --git a/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php b/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php index c208f36..f576eb9 100644 --- a/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php @@ -92,7 +92,7 @@ class PageEditTest extends NodeTestBase { $second_node_version = node_load($node->nid, $revised_node->vid); $this->assertNotIdentical($first_node_version->revision_uid, $second_node_version->revision_uid, 'Each revision has a distinct user.'); - // Ensure that the node edit screen throws a message when type no longer exists. + // Ensure that node edit screen throws a message when type no longer exists. module_enable(array('poll')); $this->drupalLogin($this->admin_user); $node = $this->drupalCreateNode(array('type' => 'poll')); diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc index e84b96c..8738801 100644 --- a/core/modules/node/node.pages.inc +++ b/core/modules/node/node.pages.inc @@ -25,8 +25,11 @@ function node_page_edit($node) { // Checks if user has access to administer content types. // Displays user-friendly error message based on user access. else { - $types_link = user_access('administer content types') ? l(t('Edit content types.'), 'admin/structure/types') : ''; - drupal_set_message(t('This content cannot be edited because the content type %type has been disabled or removed. ' . $types_link, array('%type' => $node->type)), 'error'); + $message = t('This content cannot be edited because the content type %type has been disabled or removed.', array('%type' => $node->type)) + if (user_access('administer content types')) { + $message .= ' ' . t('Edit content types', array('@administer-page' => url('admin/structure/types'))); + } + drupal_set_message($message, 'error'); return ''; } }