Issue Bug Closed

#25258Media object should respects moveJsFromHeaderToFooter=1

Alienor.net 03/04/11, 15:38 updated 05/26/11, 22:13

Description

If you set config.moveJsFromHeaderToFooter=1 in your TS template, and add a Media object, such as a youtube video, the swfobject library is correctly added at the bottom of the page, but the code calling the swfobject replacement is added inline at the same place as the media object.

This results in the javascript error “swfobject is not defined” and the media not appearing on the page.

This is due to the fact that the inline code is added without using $GLOBALS[‘TSFE’]->getPageRenderer()->addJsInlineCode(), while the library is added with $GLOBALS[‘TSFE’]->getPageRenderer()->addJsFile().
(issue imported from #M17868)

Reviews 1