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

Wrong template for YouTube content element stored in database #110

Open
fritzmg opened this issue Dec 19, 2022 · 1 comment
Open

Wrong template for YouTube content element stored in database #110

fritzmg opened this issue Dec 19, 2022 · 1 comment
Assignees

Comments

@fritzmg
Copy link

fritzmg commented Dec 19, 2022

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.

@cliffparnitzky cliffparnitzky self-assigned this Dec 19, 2022
@cliffparnitzky
Copy link
Member

Confirmed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants