Page MenuHomePhabricator

"TypeError: Cannot read property 'isDisabled' of null" when opening the editor for new section with predefined heading (section=new&preloadtitle=Test)
Closed, ResolvedPublic

Description

Mediawiki, custom loading message Template bug.

For sometime now, loading template for custom message didn't work with 2017 wikitext editor (beta feature).

We have to go through the normal editor to load template.

Event Timeline

Tomybrz created this task.Apr 24 2018, 12:28 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 24 2018, 12:28 PM
Restricted Application added a project: VisualEditor. · View Herald TranscriptApr 24 2018, 12:34 PM
Tomybrz triaged this task as High priority.Apr 24 2018, 12:35 PM
Aklapper raised the priority of this task from High to Needs Triage.Apr 24 2018, 1:23 PM

@Tomybrz: Thanks for reporting this and welcome to Phabricator. As you set the priority of this task to 'high', do you plan to work on fixing this task yourself? If yes, please set yourself as the task assignee.

I assume the first screenshot is from https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Vandalisme_en_cours . (In general, clear steps to reproduce are welcome.)

Thanks!

Aklapper changed the task status from Open to Stalled.Apr 24 2018, 1:29 PM

Steps:

  1. I go to https://fr.wikipedia.org/wiki/Sp%C3%A9cial:Pr%C3%A9f%C3%A9rences#mw-prefsection-betafeatures
  2. I enable "Nouveau mode de wikitexte"
  3. I save my changes
  4. I go to https://fr.wikipedia.org/w/index.php?title=Wikip%C3%A9dia:Vandalisme_en_cours&veaction=editsource&debug=true
  5. The page loads without any problems here.

If these steps are not the steps that you performed, please provide your steps.

Also, your screenshot shows things like "Plus" or "C" in the tab list. I do not see those elements here. Please try with safemode to make sure that the problem is not created by gadgets or personal user scripts. See https://www.mediawiki.org/wiki/Help:Locating_broken_scripts for more information. Thanks!

I removed all gadgets and all script (local and global): nothing happened

I found the bug, when i loading template for custom message, If a title needs to be loaded : 2017 Wikitext editor dosen't work, but without, it works

with bug

without bug

Please provide a clear list of steps to reproduce, step by step. See T192901#4153588 for an example.
I don't know what a "title" is in this context. :(

Aklapper renamed this task from Mediawiki | 2017 wikitext editor, custom message Templatebug to "TypeError: Cannot read property 'isDisabled' of null" trying to load a template for a custom message when no title is set.Apr 24 2018, 3:28 PM
Aklapper changed the task status from Stalled to Open.

Okay, ignore my last comment. I hope this is enough info for the developers to take a look. :) Thanks for the console output!

Tomybrz changed the task status from Open to Stalled.Apr 24 2018, 3:43 PM

wait i write step for more details

After research, gadgets and scripts do not impact the problem.

i created 2 pages to show when that happens. Must 2017 Wikitext editor enable


With the bug : Preload title on

https://fr.wikipedia.org/wiki/Discussion_utilisateur:Tomybrz/Bug

  1. Click the button or the link to leave a message
  2. Template loading
  3. 2017 Wikitext editor can't loading the template with the title
  4. requires to change to normal editor to load everything.

Without the bug : Preload title off

https://fr.wikipedia.org/wiki/Discussion_utilisateur:Tomybrz/Bug2

  1. Click the button or the link to leave a message
  2. Template loading
  3. 2017 Wikitext editor successfully loaded template without the title
  4. must to set a title for the message
matmarex claimed this task.Apr 24 2018, 4:01 PM

Change 428678 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] ve.init.mw.DesktopArticleTarget: Setup toolbar before section title input

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

Change 428678 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ve.init.mw.DesktopArticleTarget: Setup toolbar before section title input

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

matmarex changed the task status from Stalled to Open.Apr 24 2018, 5:25 PM
matmarex removed a project: Patch-For-Review.
matmarex renamed this task from "TypeError: Cannot read property 'isDisabled' of null" trying to load a template for a custom message when no title is set to "TypeError: Cannot read property 'isDisabled' of null" when opening the editor for new section with predefined heading (section=new&preloadtitle=Test).Apr 24 2018, 6:50 PM
Tomybrz closed this task as Resolved.Apr 28 2018, 10:46 AM

Thanks you, bug resolved.