Page MenuHomePhabricator

Using offset and iconWidth in {{#transcludelist}} leads to exception
Closed, ResolvedPublic

Description

On the WPX staging wiki:

{{#transcludelist:WPX:WikiProject Dogs/List 1|offset=1}}

leads to:

[416eb5dc74959d6ab3218d43] /w/index.php?title=Random_dog&action=submit JsonSchemaException from line 428 of /var/www/html/w/extensions/EventLogging/includes/JsonSchema.php: jsonschema-invalidnode

Backtrace:

#0 /var/www/html/w/extensions/EventLogging/includes/JsonSchema.php(461): JsonTreeRef->validate()
#1 /var/www/html/w/extensions/EventLogging/includes/JsonSchema.php(436): JsonTreeRef->validateObjectChildren()
#2 /var/www/html/w/extensions/EventLogging/includes/JsonSchema.php(461): JsonTreeRef->validate()
#3 /var/www/html/w/extensions/EventLogging/includes/JsonSchema.php(436): JsonTreeRef->validateObjectChildren()
#4 /var/www/html/w/extensions/EventLogging/includes/EventLogging.php(127): JsonTreeRef->validate()
#5 /var/www/html/w/extensions/CollaborationKit/includes/content/CollaborationListContent.php(128): EventLogging::schemaValidate(array, array)
#6 /var/www/html/w/extensions/CollaborationKit/includes/content/CollaborationListContent.php(985): CollaborationListContent::validateOption(string, string)
#7 [internal function]: CollaborationListContent::transcludeHook(Parser, string, string)
#8 /var/www/html/w/includes/parser/Parser.php(3408): call_user_func_array(string, array)
#9 /var/www/html/w/includes/parser/Parser.php(3129): Parser->callParserFunction(PPFrame_DOM, string, array)
#10 /var/www/html/w/includes/parser/Preprocessor_DOM.php(1199): Parser->braceSubstitution(array, PPFrame_DOM)
#11 /var/www/html/w/includes/parser/Parser.php(2943): PPFrame_DOM->expand(PPNode_DOM, integer)
#12 /var/www/html/w/includes/parser/Parser.php(1293): Parser->replaceVariables(string)
#13 /var/www/html/w/includes/parser/Parser.php(447): Parser->internalParse(string)
#14 /var/www/html/w/includes/content/WikitextContent.php(330): Parser->parse(string, Title, ParserOptions, boolean, boolean, NULL)
#15 /var/www/html/w/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Title, NULL, ParserOptions, boolean, ParserOutput)
#16 /var/www/html/w/includes/EditPage.php(3856): AbstractContent->getParserOutput(Title, NULL, ParserOptions)
#17 /var/www/html/w/includes/EditPage.php(3784): EditPage->doPreviewParse(WikitextContent)
#18 /var/www/html/w/includes/EditPage.php(2599): EditPage->getPreviewText()
#19 /var/www/html/w/includes/EditPage.php(642): EditPage->showEditForm()
#20 /var/www/html/w/includes/actions/EditAction.php(59): EditPage->edit()
#21 /var/www/html/w/includes/actions/SubmitAction.php(38): EditAction->show()
#22 /var/www/html/w/includes/MediaWiki.php(497): SubmitAction->show()
#23 /var/www/html/w/includes/MediaWiki.php(291): MediaWiki->performAction(Article, Title)
#24 /var/www/html/w/includes/MediaWiki.php(860): MediaWiki->performRequest()
#25 /var/www/html/w/includes/MediaWiki.php(521): MediaWiki->main()
#26 /var/www/html/w/index.php(43): MediaWiki->run()
#27 {main}

Similar error if iconWidth is used. Maybe it has to do with the fact that it's a number?

Event Timeline

Harej triaged this task as High priority.Mar 2 2017, 1:29 AM
Harej renamed this task from Using offset in {{#transcludelist}} leads to exception to Using offset and iconWidth in {{#transcludelist}} leads to exception.Mar 2 2017, 1:41 AM
Harej updated the task description. (Show Details)

Change 341112 had a related patch set uploaded (by harej):
[mediawiki/extensions/CollaborationKit] Fixed everything to do with transcluding lists.

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

Change 341112 merged by jenkins-bot:
[mediawiki/extensions/CollaborationKit] Fixed everything to do with transcluding lists.

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