Page MenuHomePhabricator

VE not successfully loading on pages with video or audio embeds: "TypeError: href is null" from ve.dm.MWInternalLinkAnnotation.js:141:2
Closed, ResolvedPublic

Description

Hi,

The visual editor don't work any more on this page of fr.wikiversity ( https://fr.wikiversity.org/wiki/Recherche:Imagine_un_monde/Innovations ) and only on this page or other pages if copy paste de code like on my draft page ( https://fr.wikiversity.org/wiki/Utilisateur:Lionel_Scheepmans/Brouillon ), where the bug was translated.
When the loading bar arrive to the end, the web page stay blocked and the situation happen both with firefox than Chromium on my desktop running with linux mint.

Probably some thing on the code is not supported by the VE but what ?
An other symptom of the bug on my draft page is that when I click on a link present on the menu up to the page just on right of the taklpage link, the visual Editor start to be installed automatically.

I've tried to revert my last edit but no way... Only if I come back before the copy past on my draft page the bug disappear.

It's a bite annoying because I have to finish to edit this page for Friday and I need for it to use the visual editor.
Editing with code still work, but that's much more uncomfortable for me.

Oh, I just met the same bug on this page to : https://fr.wikiversity.org/wiki/Recherche:Imagine_un_monde/Mouvement_Wikim%C3%A9dia where I had switch a part of the text coming from the page https://fr.wikiversity.org/wiki/Recherche:Imagine_un_monde/Innovations.

Maybe a clue to fix the bug ?

Cheers,

Event Timeline

Lionel_Scheepmans renamed this task from Visual editor instalation stay blocked on fr.wikiversity to Visual editor instalation stay blocked on a certain page of fr.wikiversity.Oct 16 2019, 8:32 PM
Lionel_Scheepmans updated the task description. (Show Details)

Hi @Lionel_Scheepmans, thanks for taking the time to report this!

If I go to https://fr.wikiversity.org/wiki/Recherche:Imagine_un_monde/Innovations?veaction=edit&debug=true and open the web browser's developer tools and look at the console, it shows the error TypeError: href is null.
See https://www.mediawiki.org/wiki/Help:Locating_broken_scripts for more information how to use the developer tools of your browser to find such problems yourself.

TypeError: href is null ve.dm.MWInternalLinkAnnotation.js:141:2
    getTargetDataFromHref https://fr.wikiversity.org/w/extensions/VisualEditor/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js?14f21:141
    toDataElement https://fr.wikiversity.org/w/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js?be379:89
    createDataElements https://fr.wikiversity.org/w/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?38061:545
    getDataFromDomSubtree https://fr.wikiversity.org/w/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?38061:848
    getModelFromDom https://fr.wikiversity.org/w/extensions/VisualEditor/lib/ve/src/dm/ve.dm.Converter.js?38061:619
    createModelFromDom https://fr.wikiversity.org/w/extensions/VisualEditor/lib/ve/src/init/ve.init.Target.js?a0674:232
    createModelFromDom https://fr.wikiversity.org/w/extensions/VisualEditor/modules/ve-mw/init/targets/ve.init.mw.Target.js?fad3e:182
    setupSurface https://fr.wikiversity.org/w/extensions/VisualEditor/modules/ve-mw/init/targets/ve.init.mw.Target.js?fad3e:373
Aklapper renamed this task from Visual editor instalation stay blocked on a certain page of fr.wikiversity to VE not successfully loading on certain page of fr.wikiversity: "TypeError: href is null" from ve.dm.MWInternalLinkAnnotation.js:141:2.Oct 17 2019, 6:43 AM
matmarex subscribed.

This is apparently triggered by the video embed on that page. I made a mistake in my fix for T193253: I assumed that a media thumbnail would always be a link to its description page, but this is not the case for videos. Syntax for images like [[File:Example.jpg|link=]] would also trigger the bug.

Change 543956 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Fix media embeds which don't link to the file page

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

Thanks a lot for all this information and explanations. I gone try to understand all of that latter and I'll be back after few test trying to locate or fix the bug. Cheers,

Change 543956 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Fix media embeds which don't link to the file page

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

This is apparently triggered by the video embed on that page. I made a mistake in my fix for T193253: I assumed that a media thumbnail would always be a link to its description page, but this is not the case for videos. Syntax for images like [[File:Example.jpg|link=]] would also trigger the bug.

Ok, I've removed the two videos of the page and the Visual Editor run again.
Now they are on my draft page (https://fr.wikiversity.org/wiki/Utilisateur:Lionel_Scheepmans/Brouillon) where the bug is now present.

So my question now is : how can I integrate video in my work ?
Is that some thing than I can deal with or is that a bug on the visual editro side than I can do nothing ?

Other information mayebe useful : the visual editor have no bug on wikicode edition (new wikitext mode) even when video are still on the page.

So my question now is : how can I integrate video in my work ?

By waiting a few days. :) MatmaRex' software change ("patch") to fix the problem has been merged into the code repository (see T235707#5586291). The code in the code repository will be put ("deployed") onto French Wikiversity servers on Wed 23rd of October. So the problem here should not happen anymore after that day.

So my question now is : how can I integrate video in my work ?

By waiting a few days. :) MatmaRex' software change ("patch") to fix the problem has been merged into the code repository (see T235707#5586291). The code in the code repository will be put ("deployed") onto French Wikiversity servers on Wed 23rd of October. So the problem here should not happen anymore after that day.

Ok, @Aklapper and thanks for this information. I can wait. No problem. Have a nice day !

matmarex renamed this task from VE not successfully loading on certain page of fr.wikiversity: "TypeError: href is null" from ve.dm.MWInternalLinkAnnotation.js:141:2 to VE not successfully loading on pages with video or audio embeds: "TypeError: href is null" from ve.dm.MWInternalLinkAnnotation.js:141:2.Oct 21 2019, 8:34 PM
matmarex added a subscriber: Key_of_Me.

Change 545230 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@wmf/1.35.0-wmf.2] Fix media embeds which don't link to the file page

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

Two bug reports is a lot, so I'm making a guess that many people are running into this. I'll have the patch deployed early (now).

Change 545230 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@wmf/1.35.0-wmf.2] Fix media embeds which don't link to the file page

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

Mentioned in SAL (#wikimedia-operations) [2019-10-22T11:28:20Z] <urbanecm@deploy1001> Synchronized php-1.35.0-wmf.2/extensions/VisualEditor/: SWAT: rEVED2bc4420c1963 (T235707); rEVED680a98b89294 (T233320); rEVEDd83265dd0a20 (T234564) (duration: 00m 53s)

This should be resolved on all Wikimedia wikis now.

Ryasmeen subscribed.

This seems to be working for me.

JTannerWMF subscribed.

Feel free to resolve this