Forum:Youtube embedding extension no longer working

ShoutWiki — express yourself and be heard!
Jump to navigation Jump to search
Forums: Index > Community help

Testing:


Azure Ray - Scattered Like Leaves. Youtube link.

If you don't see an embedded video just above then the Youtube extension is not currently working. I am talking about this extension:

I embedded the above video on Jan 1, 2014 on this page linked below, and it was working fine then:

There are many embedded videos on that wiki, and I hope we aren't going to eliminate this extension. I don't have the time to rewrite the wikitext for so many embedded videos on so many city pages. I also hope you don't do as Wikia did in sending a bot to do that. I dislike Wikia's current video embedding extension, and how its results look and work. --Timeshifter (talk) 16:30, 4 January 2014 (UTC)

This issue happened, because of the changes made to the extension by User:Jack Phoenix, in order to default to HTML5, instead of flash player. I already reported this issue on the bug tracker here. Until this is fixed, you need to put the full link into brackets. Example:
--MYself (talk) 16:57, 4 January 2014 (UTC)

(unindent). OK. Thanks for the quick reply. I am doing some tests. I am copying the wikitext from the video at the top of this page:

Note that the narrow 300-pixel-wide width of the video is necessary since it is part of a right sidebar on this and other pages:

<youtube width="300px">hLNiockMY_Q</youtube>

I substituted a full URL:

<youtube width="300px">http://www.youtube.com/watch?v=hLNiockMY_Q</youtube>

The width part of <youtube width="300px"> is no longer working.

Let me try without "px":

<youtube width="300">http://www.youtube.com/watch?v=hLNiockMY_Q</youtube>


It works. Here is the documentation page from Wikia for this extension:

Width is covered there, and though it does not mention "px" as being part of it, "px" has long worked. Many wikis use this extension, including wikis outside Shoutwiki. So the width option with "px" still needs to work. --Timeshifter (talk) 19:25, 4 January 2014 (UTC)

As MYself wrote, I'm the one responsible for this. I fixed bug #249 (see https://gerrit.wikimedia.org/r/#/c/101672/), and while I was adding support for HTML5, I also decided to add support for some other features, too, such as YouTube's privacy mode.
In code review it came up that another, unrelated part of the extension's codebase was rather badly-written and error-prone — it was using PHP's settype function to turn the user-supplied values into integers. I was recommended to use filter_var instead, which I did. As a side effect, users no longer need to add the px unit to height/width parameters.
I've already submitted a changeset (see https://gerrit.wikimedia.org/r/#/c/105382/) to allow videos to be embedded via the video ID instead of full URL. I'll see if I can find someone to take a look at it — it worked as it should in my tests — and then I'll merge it to the upstream repository, and from there, into our internal repository. --Jack PhoenixShoutWiki Staff (Contact) 20:23, 4 January 2014 (UTC)
Thanks for all the work. Is it also possible to allow width to work when "px" is indicated? It is commonly used in file sizing, CSS styling, etc.. Plus, there are probably thousands of videos sized with "px" on many wikis on Shoutwiki and elsewhere. I know it is more work on your part, but it is even more work on my part to fix it on my wiki.
I consider myself lucky to have escaped from Wikia a few months before they bot-changed all the video formatting. So I managed to get a database dump from Wikia where all the videos were formatted with this extension. Otherwise, I would have been stuck with their extension's video formatting, and would have had to change the formatting of hundreds of videos.
That is why I came to Shoutwiki, to get to a more standardized MediaWiki formatting. It is funny that this video extension originally came from Wikia, but it became the standard video format in many wikis, and not just Shoutwiki. So it would be nice it it remained backward compatible as much as possible. --Timeshifter (talk) 21:41, 4 January 2014 (UTC)
Yes, that should be a trivial thing to add. I'll prepare a patch for it and see about getting it deployed together with the video ID parsing fix. --Jack PhoenixShoutWiki Staff (Contact) 00:18, 6 January 2014 (UTC)
Thanks. I would like a category for pages with embedded videos on my wiki. If you feel like it, maybe you could cause use of this video extension to automatically put the page in a category. Some suggestions:
Category:Pages with videos
Category:Pages with embedded videos
Maybe the extension could allow us to choose the category name, or change it later. As with categories in templates. Via <includeonly> tags. --Timeshifter (talk) 17:21, 7 January 2014 (UTC)
The fixes are live now. Let me know if you encounter any further issues/problems/other unexpected behavior.
As for feature/enhancement requests, the ShoutWiki Bugzilla is the place to go, as outlined on the help page about reporting bugs. That way we are able to track the bugs and feature requests and the relevant people are kept on the loop. (In any case, the requested feature doesn't sound too complicated to implement, give that there are already extensiont out there which do the same thing — such as AJAX Poll categorizing its pages into the "Pages with a poll" category by default.) --Jack PhoenixShoutWiki Staff (Contact) 21:30, 7 January 2014 (UTC)
Thank you. Everything is working fine now. --MYself (talk) 11:09, 9 January 2014 (UTC)
Yes, thanks. Hope to get to Shoutwiki Bugzilla with the feature request. Maybe someone else will beat me to it? I am behind on everything. Plus I could spend the rest of my life making feature requests on Shoutwiki Bugzilla and Wikimedia Bugzilla. Bugzilla is so user-unfriendly. I wish it were as easy as this forum. I have edited the Bugzilla help page on Wikipedia trying to help others use Bugzilla. --Timeshifter (talk) 01:02, 10 January 2014 (UTC)