Page MenuHomePhabricator

mw.addWarning() not working: only the last one is shown
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
Only "Script warning: bar" is shown.

What should have happened instead?:
Both "Script warning: foo" and "Script warning: bar" are shown.

Event Timeline

Change #1175176 had a related patch set uploaded (by SomeRandomDeveloper; author: SomeRandomDeveloper):

[mediawiki/extensions/Scribunto@master] Allow adding multiple warnings using mw.addWarning

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

Change #1175176 merged by jenkins-bot:

[mediawiki/extensions/Scribunto@master] Allow adding multiple warnings using mw.addWarning

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

Suggested wording for tech news:

The mw.addWarning() function in Lua that can be used to add script warnings to the page preview now allows showing multiple warnings if called multiple times. Before this change, only the warning that was last added was shown.