Ich habe folgendes modifiziertes news_short Template aus einer Contao 3.5 Installation, das nun in Contao 4.4 unter PHP 7.1 nicht mehr richtig funktioniert:
Das <a> Tag nicht mehr geöffnet - nur das abschliessende Tag ist noch vorhanden. Und "src" bleibt leer, dadurch ist das verlinkte Bild nicht mehr sichtbar.
Warum rendert Contao 4 das anders?
Abschnitt aus meinem Template:
PHP-Code:
<?php if ($this->teaser_addImage): ?>
<figure class="image_container<?php echo $this->teaser_floatClass; ?>"<?php if ($this->teaser_margin || $this->teaser_float): ?> style="<?php echo trim($this->teaser_margin . $this->teaser_float); ?>"<?php endif; ?>>
<?php if ($this->teaser_href): ?>
<a href="<?php echo $this->teaser_href; ?>"<?php echo $this->teaser_attributes; ?> title="<?php echo $this->teaser_alt; ?>">
<?php endif; ?>
<img src="<?php echo $this->teaser_src; ?>"<?php echo $this->teaser_imgSize; ?> alt="<?php echo $this->teaser_alt; ?>" />
</a>
<?php if ($this->teaser_caption): ?>
<figcaption class="caption"><?php echo $this->teaser_caption; ?></figcaption>
<?php endif; ?>
</figure>
HTML Ausgabe unter Contao 3.5:
HTML-Code:
<figure class="image_container">
<a href="nachrichtenleser/219.html" title="Messe">
<img src="files/news/messe_2018.jpg" width="1131" height="800" alt="Messe" />
</a>
</figure>
HTML Ausgabe unter Contao 4.4 ohne <a>:
HTML-Code:
<figure class="image_container">
<img src="" alt="Messe" />
</a>
</figure>
Lesezeichen