Page MenuHomePhabricator

Can't save page with labelled section transclusion markup (even section editing elsewhere)
Open, MediumPublic1 Estimated Story Points

Description

Steps to become confused:

  1. Open VisualEditor's wikitext mode, and paste in this content:
== Corrupted section ==

{{#lsth:}}

== Innocent section ==
Plain section
  1. Try to save the page.
  1. Well, that didn't work, so switch to a different wikitext editor, paste it in there, and save it.
  1. Now open just the innocent section in VisualEditor's wikitext mode.
  1. Type a word or two.
  1. Try to save the page.
  1. Well, that didn't work either, which makes absolutely no sense if it's true section editing (i.e., not processing the rest of the page).
  1. File bug.

First spotted at https://www.mediawiki.org/wiki/Extension_talk:Labeled_Section_Transclusion and reported by @FreedomFighterSparrow at https://www.mediawiki.org/wiki/Topic:Tnmwzywj9gqgva8h

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

"File bug" in reproducing steps? You just created an infinite loop.

I assume that at some point, they'll fix the bug, and then the resulting error condition will cause the script to abort at step 3. ;-)

Yap. But no infinite loop in the world is actually infinite, it will stop before the year 3,017. It will be fixed indeed, but until then, there will be 328,062 same bugs filed.

Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Esanders renamed this task from The wikitext mode is overly sensitive to the contents of the rest of the page to Can't save page with labelled section transclusion markup (even section editing elsewhere).Jun 20 2017, 11:21 PM
Esanders added a project: Parsoid.
Esanders subscribed.

Could be a Parsoid issue?

Could be a Parsoid issue?

It is not because preview works.

But, here is the exception that gets thrown. Details inlined below.

t exception.file 	/srv/mediawiki/php-1.30.0-wmf.5/extensions/LabeledSectionTransclusion/LabeledSectionTransclusion.class.php:122
t exception.message 	Call to a member function getPrefixedText() on a non-object (null)
t exception.trace 	#0 /srv/mediawiki/php-1.30.0-wmf.5/extensions/LabeledSectionTransclusion/LabeledSectionTransclusion.class.php(568): LabeledSectionTransclusion::parse_(Parser, NULL, string, string, integer)
#1 /srv/mediawiki/php-1.30.0-wmf.5/includes/parser/Parser.php(3416): LabeledSectionTransclusion::pfuncIncludeHeading(Parser, string)
#2 /srv/mediawiki/php-1.30.0-wmf.5/includes/parser/Parser.php(3136): Parser->callParserFunction(PPFrame_Hash, string, array)
#3 /srv/mediawiki/php-1.30.0-wmf.5/includes/parser/Preprocessor_Hash.php(1072): Parser->braceSubstitution(array, PPFrame_Hash)
#4 /srv/mediawiki/php-1.30.0-wmf.5/includes/parser/Parser.php(2950): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#5 /srv/mediawiki/php-1.30.0-wmf.5/includes/parser/Parser.php(1305): Parser->replaceVariables(string)
#6 /srv/mediawiki/php-1.30.0-wmf.5/includes/parser/Parser.php(451): Parser->internalParse(string)
#7 /srv/mediawiki/php-1.30.0-wmf.5/includes/content/WikitextContent.php(330): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#8 /srv/mediawiki/php-1.30.0-wmf.5/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#9 /srv/mediawiki/php-1.30.0-wmf.5/includes/poolcounter/PoolWorkArticleView.php(140): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#10 /srv/mediawiki/php-1.30.0-wmf.5/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#11 /srv/mediawiki/php-1.30.0-wmf.5/includes/page/WikiPage.php(1083): PoolCounterWork->execute()
#12 /srv/mediawiki/php-1.30.0-wmf.5/includes/api/ApiParse.php(579): WikiPage->getParserOutput(ParserOptions, integer, boolean)
#13 /srv/mediawiki/php-1.30.0-wmf.5/includes/api/ApiParse.php(121): ApiParse->getParsedContent(WikiPage, ParserOptions, boolean, NULL, Revision, boolean)
#14 /srv/mediawiki/php-1.30.0-wmf.5/includes/api/ApiMain.php(1578): ApiParse->execute()
#15 /srv/mediawiki/php-1.30.0-wmf.5/includes/api/ApiMain.php(514): ApiMain->executeAction()
#16 /srv/mediawiki/php-1.30.0-wmf.5/extensions/VisualEditor/ApiVisualEditorEdit.php(78): ApiMain->execute()
#17 /srv/mediawiki/php-1.30.0-wmf.5/extensions/VisualEditor/ApiVisualEditorEdit.php(327): ApiVisualEditorEdit->parseWikitext(integer)
#18 /srv/mediawiki/php-1.30.0-wmf.5/includes/api/ApiMain.php(1578): ApiVisualEditorEdit->execute()
#19 /srv/mediawiki/php-1.30.0-wmf.5/includes/api/ApiMain.php(545): ApiMain->executeAction()
#20 /srv/mediawiki/php-1.30.0-wmf.5/includes/api/ApiMain.php(516): ApiMain->executeActionWithErrorHandling()
#21 /srv/mediawiki/php-1.30.0-wmf.5/api.php(83): ApiMain->execute()
#22 /srv/mediawiki/w/api.php(3): include(string)
#23 {main}