Verified Commit c1e7cc2d authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3458612 by catch, longwave, ankitv18, Spokje: Remove legacy 'metadata'...

Issue #3458612 by catch, longwave, ankitv18, Spokje: Remove legacy 'metadata' variable from node.html.twig
parent 515180af
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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'];
+0 −2
Original line number Diff line number Diff line
@@ -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 %}
+0 −1
Original line number Diff line number Diff line
@@ -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.
+0 −1
Original line number Diff line number Diff line
@@ -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.
+0 −1
Original line number Diff line number Diff line
@@ -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.
Loading