Skip to content
This repository was archived by the owner on Jan 22, 2024. It is now read-only.

Wrong template for YouTube content element stored in database #110

@fritzmg

Description

@fritzmg

The SQL dump erroneously uses the ce_player_responsive template here for a content element that is actually a YouTube video (which would use ce_youtube template otherwise). Thus the following error will occur:

TypeError:
implode(): Argument #1 ($pieces) must be of type array, string given

  at vendor/contao/core-bundle/src/Resources/contao/templates/elements/ce_player.html5:13
  at implode(' ', null)
     (vendor/contao/core-bundle/src/Resources/contao/templates/elements/ce_player.html5:13)
  at include('/www/htdocs/xyz/contao_official_demo/vendor/contao/core-bundle/src/Resources/contao/templates/elements/ce_player.html5')
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/TemplateInheritance.php:108)
  at Contao\Template->inherit()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Template.php:295)
  at Contao\Template->parse()
     (vendor/contao/core-bundle/src/Resources/contao/classes/FrontendTemplate.php:43)
  at Contao\FrontendTemplate->parse()
     (vendor/contao/core-bundle/src/Resources/contao/elements/ContentElement.php:276)
  at Contao\ContentElement->generate()
     (vendor/contao/core-bundle/src/Resources/contao/elements/ContentYouTube.php:50)
  at Contao\ContentYouTube->generate()

To fix this the customTpl field should be set to an empty string in the SQL dump for this content element.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions