Page MenuHomePhabricator

specifying image size to videos with thumbnail on English Wikipedia breaks the preview of the video
Closed, ResolvedPublic1 Story Points

Description


In this example I specify the video thumbnail width as 300px and the preview first shows the video thumbnail as tiny and then dissapears (top right of the article)
https://en.wikipedia.org/wiki/Trump_administration_family_separation_policy

File available here
https://commons.wikimedia.org/wiki/File:Crying_children_who_have_been_separated_from_their_families_at_the_U.S._border.webm

I think I'm using the 2017 wikitext editor

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 25 2018, 1:38 PM

Please follow https://mediawiki.org/wiki/How_to_report_a_bug and provide a list of steps to reproduce, including links that allow others to try reproducing, plus information which editor is being used. Thanks!

I think the issue is TMH currently only knows about PHP HTML, so doesn't work with Parsoid HTML.

Deskana added a subscriber: Deskana.

I guess this is an issue with TimedMediaHandler and not the visual editor?

brion added a subscriber: brion.
matmarex added a subscriber: matmarex.

Fixing T154844 (using PHP Parser rather than Parsoid for NWE previews) would also fix this.

brion added a comment.Jun 26 2018, 7:26 PM

In Chrome I'm not experiencing disappearing thumbnails or unusual size on https://en.wikipedia.org/wiki/User:Brion_Vibber_(WMF)/Video_VE_test when testing either of:

  • changing size of video through 'edit' / advanced
  • changing size of video by dragging the corner
  • inserting a new video

Can someone list steps to reproduce, or am I misunderstanding the issue?

brion added a comment.Jun 26 2018, 8:30 PM

(I do see that the thumbnail changes on the example taken from the referenced article; it looks like the 'thumbtime' parameter is not being passed through when the thumbnail is reloaded, so it gets the default time.)

@brion It's about the preview functionality of new wikitext editor, you have to enable "New wikitext mode" on https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-betafeatures, then you can access the editor at https://en.wikipedia.org/wiki/User:Brion_Vibber_(WMF)/Video_VE_test?veaction=editsource and use "Publish page…" → "Show preview".

(I do see that the thumbnail changes on the example taken from the referenced article; it looks like the 'thumbtime' parameter is not being passed through when the thumbnail is reloaded, so it gets the default time.)

T198150: 'thumbtime' not preserved when re-generating view rendering of video thumbnail in VE

brion added a comment.Jun 26 2018, 9:18 PM

Gotcha -- yes, can reproduce the bug in Chrome and Safari. Thanks for filing the side bug. :)

brion added a comment.Jun 26 2018, 9:23 PM

Yeah, looks like the old-style mwembed player in TMH is getting confused about the parsoid-style markup and is ending up with a zero-size widget. Do y'all prefer that I try to fix the frontend to work with that markup, or leave it to to changing which markup is used (T154844)?

Yeah, looks like the old-style mwembed player in TMH is getting confused about the parsoid-style markup and is ending up with a zero-size widget. Do y'all prefer that I try to fix the frontend to work with that markup, or leave it to to changing which markup is used (T154844)?

The former. When we switch all read HTML to use Parsoid output this work will need to be done anyway.

I'm having trouble reproducing this in an isolated environment.

MediaWiki-vagrant set up with:

  • with timedmediahandler role and whatever else I had already installed
  • added visualeditor role & re-provisioned
  • set in LocalSettings:
$wgVisualEditorEnableWikitext = true;
$wgVisualEditorEnableWikitextBetaFeature = true;

$wgDefaultUserOptions['visualeditor-newwikitext'] = 1;
$wgHiddenPrefs[] = 'visualeditor-newwikitext';

Copied my test page https://en.wikipedia.org/wiki/User:Brion_Vibber_(WMF)/Video_VE_test over. I get full-size thumbs and no attempt at a TimedMediaHandler transform. It looks like the loader JS for TMH's mwembedplayer isn't being loaded at all on the edit page or the preview, so its hook for 'wikipage.content' never gets called at runtime.

Production seems to still have the pre-merge MwEmbedSupport extension, but I don't see offhand what would cause it to be loading this loader JS before when it doesn't now.

Ah, I figured it out. It was only triggering when editing was started from the article view (in which case TMH was already loaded), whereas in most of my testing I was reloading at the action=edit page, with no TMH loaded. I can now reliably trigger it. :D

I'll clean it up so the behavior is more consistent when I'm fixing the other bits over on T198266.

Change 442365 had a related patch set uploaded (by Brion VIBBER; owner: Brion VIBBER):
[mediawiki/extensions/TimedMediaHandler@master] Fixes for parsoid-rendered previews in NWE / 2017 wikitext editor

https://gerrit.wikimedia.org/r/442365

Change 442365 merged by jenkins-bot:
[mediawiki/extensions/TimedMediaHandler@master] Fixes for parsoid-rendered previews in NWE / 2017 wikitext editor

https://gerrit.wikimedia.org/r/442365

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptJun 28 2018, 5:05 PM
Vvjjkkii renamed this task from specifying image size to videos with thumbnail on English Wikipedia breaks the preview of the video to gcaaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii triaged this task as High priority.
Vvjjkkii removed brion as the assignee of this task.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed the point value for this task.
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot set the point value for this task to 1.Jul 2 2018, 10:09 AM
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot assigned this task to brion.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot closed this task as Resolved.
CommunityTechBot renamed this task from gcaaaaaaaa to specifying image size to videos with thumbnail on English Wikipedia breaks the preview of the video .
CommunityTechBot added subscribers: gerritbot, Aklapper.