Bug #58569

Content element "media" does not render Youtube videos

Added by Thomas Off about 1 year ago. Updated about 1 year ago.

Status:Resolved Start date:2014-05-06
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:Frontend Spent time: -
Target version:next-patchlevel
TYPO3 Version:6.2 Is Regression:Yes
PHP Version: Sprint Focus:
Complexity:

Description

In TYPO3 6.2 the "media" content element does not handle Youtube videos correctly: it renders a wrong URL into the object tag.

I compared 6.1 and 6.2, added a "media" element in both and used the same Youtube URL (https://www.youtube.com/watch?v=e0AW-wtPl1o); in 6.1 I get the following URL in the object tag:

http://www.youtube.com/v/e0AW-wtPl1o?fs=1

In 6.2 I get the following:

http://www.youtube.com/embed/e0AW-wtPl1o?fs=1

When examining the URLs, I found out that the one from 6.1 loads a Flash file, while the URL generated in 6.2 fetches an HTML page (which in turn does not play in the Flash object). So in my opinion there are two options:

1. Revert the URL rendering to what it was in 6.1.
2. Change the media element so that Youtube videos are not rendered using Flash, but an Iframe (which is what Youtube recommends anyway).


Related issues

related to Core - Bug #51728: MediaWizardProvider::process_youtube does not handle all ... Resolved 2013-09-04
related to Core - Bug #33090: New way to embed youtube videos New 2012-01-10
related to Core - Bug #58986: Content element Media: 2 bug with External URL in 6.2.2: ... Resolved 2014-05-21
duplicated by Core - Bug #58985: Content element Media: 1 bug with External URL in 6.2.2: ... Closed 2014-05-21

Associated revisions

Revision 6118ac5f
Added by Thomas Löffler about 1 year ago

[BUGFIX] Fix url for youtube embeds

Additionally solve the problem when http:// is missing
due to usage of the link wizard.

Change-Id: I676d14b4ddf81d5d3ec0fc0d0ebb32d08910047a
Resolves: #58569
Resolves: #58986
Releases: 6.2
Reviewed-on: https://review.typo3.org/29952
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Markus Klein
Tested-by: Markus Klein

History

#1 Updated by Marco Seiler about 1 year ago

I can confirm this issue.

The responsible code is in typo3/sysext/frontend/Classes/MediaWizard/MediaWizardProvider.php on line 141:

$url = $this->getUrlSchema() . 'www.youtube.com/embed/' . $videoId . '?fs=1';

I think it should be
$url = $this->getUrlSchema() . 'www.youtube.com/v/' . $videoId . '?fs=1';

Was introduced while resolving this issue: http://forge.typo3.org/issues/51728

#2 Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29952

#3 Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29952

#4 Updated by Markus Klein about 1 year ago

  • Is Regression changed from No to Yes

#5 Updated by Thomas Löffler about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF