Topic on 2017 wikitext editor/Feedback

Problem saving here, possibly because of tags?

7
Summary by Whatamidoing (WMF)
FreedomFighterSparrow (talkcontribs)

I tried to reply to the user who posted this question, but could not save the page when using the 2017 wikitext editor - I had to switch back. I kept getting the following error:

Something went wrong

[WNqzgwpAEDMAAUdWgD0AAACX] Exception caught: Call to a member function getPrefixedText() on a non-object (null)

You can reproduce this error by trying to edit the mentioned section.


I tried escaping everything in the user's example as well (nowiki, HTML entities, the works), but that didn't help.

The specific error is common to Extension:Labeled Section Transclusion itself, might it be trying to parse code that's inside a <nowiki> block?

My latest hypothesis is that editor parses the entire page even when I'm only editing a section, and the problem is elsewhere on the page - to test that, I tried saving just this section ( See User:FreedomFighterSparrow/Sandbox), and it worked just fine; then I copied and tried to save the entire talkpage, and that failed with the same error, so it bears out.

Then I switched back to the old editor, and at first couldn't save the entire page - I got the following fine error:

[WNq2LgpAAD0AAMkwlioAAACC] 2017-03-28 19:14:55: Fatal exception of type "BadMethodCallException"

. This might be a fluke; a second attempt succeded.


So, all in all, it seems like a bug in the new editor... or more probably, some problem in the page that the old editor was more lenient about.

Whatamidoing (WMF) (talkcontribs)

I could edit the bit in your first sandbox; I could edit the second sandbox in VisualEditor's visual mode, but not in its wikitext mode. This edit (assuming that there's a single problem on a page, blanking most and restoring until you get a problem is a quick way to find the broken syntax) produced rather unexpected results. However, the problem is a single bit of code, which you can see by going to https://www.mediawiki.org/w/index.php?title=User:FreedomFighterSparrow/Sandbox2&oldid=2436110 and editing the page (nothing will be displayed): #lsth: in double curly braces. I don't know what this code is or does (beyond "probably some kind of parser function") or why it prevents you from saving the page, but that seems to be the problem. Converting one curly brace to the ASCII code (&#123;) made it possible to edit the full page again.

Whatamidoing (WMF) (talkcontribs)

Oh, when you test something like this, remember that adding a blank space or line at the end of the page doesn't actually create a new revision, so it looks like it worked, but nothing actually happens. So if you might have done that on the interim step, then that would explain it apparently working once.

FreedomFighterSparrow (talkcontribs)

Thanks for looking at this!

Just to confirm:

  1. is the new wikitext editor indeed parsing the entire page, even when I'm just editing a section?
  2. I do admit I had no idea wikitext inside <code> tags is expanded (and apparently whoever posted that bit of code didn't either), but it seems it is. Is that correct?


At any rate, so the problem is in the extension itself - it looks like LST doesn't handle gracefully being called without any parameters. I'm having a hard time deciding whether to fix the extension or just assume this is an edge case and fix the specific talk page :-)

Whatamidoing (WMF) (talkcontribs)

On question #2 (aka "the easy one" ;-), the <code> tag is just HTML character styling (like using <b> for bold-faced text). It's true HTML, so it doesn't have any effect on the wikitext processing.

Whatamidoing (WMF) (talkcontribs)

The answer to question #1 is now phab:T164031. I think that the conversation could be fairly summarized as, "It doesn't... Huh, that's odd."

FreedomFighterSparrow (talkcontribs)

:-) Thanks for looking at this and creating the task.

Reply to "Problem saving here, possibly because of tags?"