Skip to content

Inkludiertes HTML/IFrame-Template in news_full wird nicht geblockt #293

@Shoekrates

Description

@Shoekrates

Prerequisites

  • I checked for duplicate issues (open and closed)
  • I am using the latest stable version/release of the Contao Cookiebar
  • I made sure that my own template changes, CSS or JS do not interfere with the Contao Cookiebar
  • This issue contains only one bug.
  • This issue is not a question, not a feature request and I have read the documentation and pinned issues

Please select the topic(s) that most closely match your concern

Template (HTML/Twig)

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you experiencing the problem on?

Firefox

Description

Contao 5.7.3, Cookiebar 2.3.6. Wir bauen während eines Contao-Updates von 4.13 auf Twig um.
Ich habe ein Varianten-Template des news_full, in das ich per
{% include '@Contao/ce_html_podcaster_de.html.twig' with {podcastid: podcastid} %}
den Podcaster-iFrame als html-Template inkludiere. Die Variable podcastid wird über eine DCA-Erweiterung in der tl_news bedient.

Im Gegensatz zur 4.13-er Version mit der Cookiebar 1.17.8 wird das inkludierte Template nicht geblockt, sondern es wird direkt der Player angezeigt.

In der config.yml habe ich den iframe korrekt und analog zur alten Version angemeldet:

contao_cookiebar:
  iframe_types:
    podcaster.de: 
      - ce_html_podcaster_de

Lege ich das HTML-Template testweise als Variante (content_element/html/podcaster-de.html.twig) ab, wird der include gar nicht erst im news_full gerendert.
Wenn ich in der Newsmeldung selbst ein HTML-Element mit Varianten-Template (hier dann zum Test feste podcastid) anlege, wird es ordnungsgemäß initial geblockt.

Geht der Weg über das inkludierte und initial geblockte Twig-Template überhaupt noch oder muss ich hier umdenken? Habt ihr Ideen, wie ich das wieder zum (blockierten) Laufen bekomme?

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions