From c1e7cc2d98cfd2dd23ef0a0a32f5a0763cdfcb8b Mon Sep 17 00:00:00 2001
From: nod_ <nod_@598310.no-reply.drupal.org>
Date: Wed, 17 Jul 2024 15:21:44 +0200
Subject: [PATCH] Issue #3458612 by catch, longwave, ankitv18, Spokje: Remove
 legacy 'metadata' variable from node.html.twig

---
 core/modules/node/node.module                                | 5 +++++
 core/modules/node/templates/node.html.twig                   | 2 --
 .../umami/templates/content/node--article--full.html.twig    | 1 -
 .../umami/templates/content/node--card-common-alt.html.twig  | 1 -
 .../umami/templates/content/node--card-common.html.twig      | 1 -
 .../themes/umami/templates/content/node--card.html.twig      | 1 -
 .../demo_umami/themes/umami/templates/content/node.html.twig | 1 -
 core/themes/claro/templates/classy/content/node.html.twig    | 1 -
 core/themes/olivero/templates/content/node--teaser.html.twig | 1 -
 core/themes/olivero/templates/content/node.html.twig         | 1 -
 core/themes/stable9/templates/content/node.html.twig         | 1 -
 .../themes/starterkit_theme/templates/content/node.html.twig | 1 -
 12 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index e0c49f01573b..95c014d146cf 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -481,6 +481,11 @@ function template_preprocess_node(&$variables) {
   $variables['deprecations']['teaser'] = "'teaser' is deprecated in drupal:11.1.0 and is removed in drupal:12.0.0. Use 'view_mode' instead. See https://www.drupal.org/node/3458185";
   $variables['teaser'] = $variables['view_mode'] == 'teaser';
 
+  // The 'metadata' variable was originally added to support RDF, which has now
+  // been moved to contrib. It was needed because it is not possible to
+  // extend the markup of the 'submitted' variable generically.
+  $variables['deprecations']['metadata'] = "'metadata' is deprecated in drupal:11.1.0 and is removed in drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3458638";
+
   $variables['node'] = $variables['elements']['#node'];
   /** @var \Drupal\node\NodeInterface $node */
   $node = $variables['node'];
diff --git a/core/modules/node/templates/node.html.twig b/core/modules/node/templates/node.html.twig
index c27cbcf40683..4420ac103e86 100644
--- a/core/modules/node/templates/node.html.twig
+++ b/core/modules/node/templates/node.html.twig
@@ -22,7 +22,6 @@
  *   of a given child element.
  * - author_picture: The node author user entity, rendered using the "compact"
  *   view mode.
- * - metadata: Metadata for this node.
  * - date: (optional) Themed creation date field.
  * - author_name: (optional) Themed author name field.
  * - url: Direct URL of the current node.
@@ -76,7 +75,6 @@
       {{ author_picture }}
       <div{{ author_attributes }}>
         {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
-        {{ metadata }}
       </div>
     </footer>
   {% endif %}
diff --git a/core/profiles/demo_umami/themes/umami/templates/content/node--article--full.html.twig b/core/profiles/demo_umami/themes/umami/templates/content/node--article--full.html.twig
index 0a50a15c5700..060270cfe0eb 100644
--- a/core/profiles/demo_umami/themes/umami/templates/content/node--article--full.html.twig
+++ b/core/profiles/demo_umami/themes/umami/templates/content/node--article--full.html.twig
@@ -22,7 +22,6 @@
  *   of a given child element.
  * - author_picture: The node author user entity, rendered using the "compact"
  *   view mode.
- * - metadata: Metadata for this node.
  * - date: (optional) Themed creation date field.
  * - author_name: (optional) Themed author name field.
  * - url: Direct URL of the current node.
diff --git a/core/profiles/demo_umami/themes/umami/templates/content/node--card-common-alt.html.twig b/core/profiles/demo_umami/themes/umami/templates/content/node--card-common-alt.html.twig
index 4e493934bf50..f325a67f00ab 100644
--- a/core/profiles/demo_umami/themes/umami/templates/content/node--card-common-alt.html.twig
+++ b/core/profiles/demo_umami/themes/umami/templates/content/node--card-common-alt.html.twig
@@ -22,7 +22,6 @@
  *   of a given child element.
  * - author_picture: The node author user entity, rendered using the "compact"
  *   view mode.
- * - metadata: Metadata for this node.
  * - date: (optional) Themed creation date field.
  * - author_name: (optional) Themed author name field.
  * - url: Direct URL of the current node.
diff --git a/core/profiles/demo_umami/themes/umami/templates/content/node--card-common.html.twig b/core/profiles/demo_umami/themes/umami/templates/content/node--card-common.html.twig
index 5550eea99965..97f0c8e01207 100644
--- a/core/profiles/demo_umami/themes/umami/templates/content/node--card-common.html.twig
+++ b/core/profiles/demo_umami/themes/umami/templates/content/node--card-common.html.twig
@@ -22,7 +22,6 @@
  *   of a given child element.
  * - author_picture: The node author user entity, rendered using the "compact"
  *   view mode.
- * - metadata: Metadata for this node.
  * - date: (optional) Themed creation date field.
  * - author_name: (optional) Themed author name field.
  * - url: Direct URL of the current node.
diff --git a/core/profiles/demo_umami/themes/umami/templates/content/node--card.html.twig b/core/profiles/demo_umami/themes/umami/templates/content/node--card.html.twig
index adae60573d6b..119c66840991 100644
--- a/core/profiles/demo_umami/themes/umami/templates/content/node--card.html.twig
+++ b/core/profiles/demo_umami/themes/umami/templates/content/node--card.html.twig
@@ -22,7 +22,6 @@
  *   of a given child element.
  * - author_picture: The node author user entity, rendered using the "compact"
  *   view mode.
- * - metadata: Metadata for this node.
  * - date: (optional) Themed creation date field.
  * - author_name: (optional) Themed author name field.
  * - url: Direct URL of the current node.
diff --git a/core/profiles/demo_umami/themes/umami/templates/content/node.html.twig b/core/profiles/demo_umami/themes/umami/templates/content/node.html.twig
index 2da813403de5..7116a5ed29dd 100644
--- a/core/profiles/demo_umami/themes/umami/templates/content/node.html.twig
+++ b/core/profiles/demo_umami/themes/umami/templates/content/node.html.twig
@@ -22,7 +22,6 @@
  *   of a given child element.
  * - author_picture: The node author user entity, rendered using the "compact"
  *   view mode.
- * - metadata: Metadata for this node.
  * - date: (optional) Themed creation date field.
  * - author_name: (optional) Themed author name field.
  * - url: Direct URL of the current node.
diff --git a/core/themes/claro/templates/classy/content/node.html.twig b/core/themes/claro/templates/classy/content/node.html.twig
index 34e9cf921e0a..710c62ec968d 100644
--- a/core/themes/claro/templates/classy/content/node.html.twig
+++ b/core/themes/claro/templates/classy/content/node.html.twig
@@ -22,7 +22,6 @@
  *   of a given child element.
  * - author_picture: The node author user entity, rendered using the "compact"
  *   view mode.
- * - metadata: Metadata for this node.
  * - date: (optional) Themed creation date field.
  * - author_name: (optional) Themed author name field.
  * - url: Direct URL of the current node.
diff --git a/core/themes/olivero/templates/content/node--teaser.html.twig b/core/themes/olivero/templates/content/node--teaser.html.twig
index b641705881bf..40a2c51e4a24 100644
--- a/core/themes/olivero/templates/content/node--teaser.html.twig
+++ b/core/themes/olivero/templates/content/node--teaser.html.twig
@@ -22,7 +22,6 @@
  *   of a given child element.
  * - author_picture: The node author user entity, rendered using the "compact"
  *   view mode.
- * - metadata: Metadata for this node.
  * - date: (optional) Themed creation date field.
  * - author_name: (optional) Themed author name field.
  * - url: Direct URL of the current node.
diff --git a/core/themes/olivero/templates/content/node.html.twig b/core/themes/olivero/templates/content/node.html.twig
index 9c45bdf2d9d5..4af6e2ffb53e 100644
--- a/core/themes/olivero/templates/content/node.html.twig
+++ b/core/themes/olivero/templates/content/node.html.twig
@@ -22,7 +22,6 @@
  *   of a given child element.
  * - author_picture: The node author user entity, rendered using the "compact"
  *   view mode.
- * - metadata: Metadata for this node.
  * - date: (optional) Themed creation date field.
  * - author_name: (optional) Themed author name field.
  * - url: Direct URL of the current node.
diff --git a/core/themes/stable9/templates/content/node.html.twig b/core/themes/stable9/templates/content/node.html.twig
index 9f4648a1ab9d..e73d76e651f7 100644
--- a/core/themes/stable9/templates/content/node.html.twig
+++ b/core/themes/stable9/templates/content/node.html.twig
@@ -22,7 +22,6 @@
  *   of a given child element.
  * - author_picture: The node author user entity, rendered using the "compact"
  *   view mode.
- * - metadata: Metadata for this node.
  * - date: (optional) Themed creation date field.
  * - author_name: (optional) Themed author name field.
  * - url: Direct URL of the current node.
diff --git a/core/themes/starterkit_theme/templates/content/node.html.twig b/core/themes/starterkit_theme/templates/content/node.html.twig
index 1abb091f71f7..c620305f6c4f 100644
--- a/core/themes/starterkit_theme/templates/content/node.html.twig
+++ b/core/themes/starterkit_theme/templates/content/node.html.twig
@@ -22,7 +22,6 @@
  *   of a given child element.
  * - author_picture: The node author user entity, rendered using the "compact"
  *   view mode.
- * - metadata: Metadata for this node.
  * - date: (optional) Themed creation date field.
  * - author_name: (optional) Themed author name field.
  * - url: Direct URL of the current node.
-- 
GitLab