Fix $url must be a string or object of type \Drupal\Core\Url

Created on 12 January 2023, about 2 years ago
Updated 23 January 2023, about 2 years ago

Problem/Motivation

$url must be a string or object of type \Drupal\Core\Url in media--drowl-media-types--document.html.twig

Steps to reproduce

Proposed resolution

{% block document_link %}
        {% if content.field_document.0['#url'] %}
          {%- set link_label %}
            {% if mime_type %}
              <i class="ico {{ icon_class }}"></i>
            {% endif %}
            <span class="button__label">{{ button_label }}</span>
          {% endset -%}
          {% apply spaceless %}
            {{ link(link_label, content.field_document.0['#url'], media_link_attributes.addClass(link_classes)) }}
          {% endapply %}
        {% endif %}
      {% endblock %}

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇩🇪Germany Grevil

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024