Page MenuHomePhabricator

Self-closed TemplateData tag results in TypeError
Closed, ResolvedPublicPRODUCTION ERROR

Description

If you attempt to preview or save a page containing a self-closed templatedata tag (<templatedata/>), an error occurs.

Error message
[a59b953b-aac4-4f55-85dd-84926859ac6b] 2020-09-23 00:52:01: Fatal exception of type "TypeError"
Stack Trace

Details

Request ID
a59b953b-aac4-4f55-85dd-84926859ac6b
Request URL
https://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&action=submit

Event Timeline

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

Probably caused by the strict typing added in gerrit:624000 although I think the content of the tag supposed to/used not be null even if no content is passed on wiki. But that seems to not be the case, as all the Parser does is to pass null to the callback as the content.

Change 629247 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/extensions/TemplateData@master] Force tag content to string before constructing TemplateDataBlob object

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

Change 629247 merged by jenkins-bot:
[mediawiki/extensions/TemplateData@master] Force tag content to string before constructing TemplateDataBlob object

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

Ammarpad claimed this task.