Bug #25258
Media object should respects moveJsFromHeaderToFooter=1
| Status: | Closed | Start date: | 2011-03-04 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Oliver Hader | % Done: | 100% |
|
| Category: | Frontend | |||
| Target version: | 4.5.3 | |||
| TYPO3 Version: | 4.5 | Complexity: | ||
| PHP Version: | 5.3 | |||
| Votes: | 0 |
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)
Associated revisions
[BUGFIX] Media obj respect moveJsFromHeaderToFooter
If you set config.moveJsFromHeaderToFooter=1 in your TS template, and
add a Media object, the swfobject library is correctly added at the
bottom of the page, but the inline code calling the swfobject library
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 change makes use of t3lib_PageRenderer::addJsInlineCode to add
the inline code, so it respects config.moveJsFromHeaderToFooter=1.
Change-Id: I971ebb2c31568e40a3209dfcf7871010e830565e
Resolves: #25258
Reviewed-on: http://review.typo3.org/1062
Reviewed-by: Steffen Kamper
Reviewed-by: Björn Pedersen
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/1547
History
Updated by Alienor.net about 2 years ago
Updated by Mr. Hudson about 2 years ago
Patch set 1 of change I971ebb2c31568e40a3209dfcf7871010e830565e has been pushed to the review server.
It is available at http://review.typo3.org/1547
Updated by Oliver Hader about 2 years ago
- Category changed from Communication to Frontend
- Status changed from New to Resolved
- Assignee set to Oliver Hader
- Target version changed from 0 to 4.5.3
- % Done changed from 0 to 100
Submitted for TYPO3 4.5.3 and 4.6-alpha1
Updated by Oliver Hader almost 2 years ago
- Status changed from Resolved to Closed