Page MenuHomePhabricator

Wrap Scribunto error message into class=error
Closed, ResolvedPublic

Description

When attempting to store Lua code with fatal errors, in page head scribunto-lua-error-location system message appears.

Currently this is just <p> in regular black.

I would like to see it wrapped in <div class="error">, appearing in red colour and stronger letters, and detectable.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 24 2018, 12:55 PM
Anomie added a subscriber: Anomie.Jan 25 2018, 5:37 PM

Please provide more detail as to where exactly the message appears and how to reproduce it. The message cited is generically used for every exception thrown, many of which are already wrapped with <strong class="error">.

“When attempting to store” – well, create Lua code page with fatal error. E.g. a single line

local invalid = ?

Drop this on a new Module: page and try to save or “publish”.

I thought this had been fixed long ago. After some digging, I find that it was: rMWa02a7ff8eab9: EditPage: Show EditFilterMergedContent hook errors in an errorbox fixed it in 2016. But then T149473: Edit warnings have escaped HTML just reverted it instead of actually fixing the problem, which at a glance seems like could have been done by just changing the getHtml() call in formatStatusError() to getWikiText().

Change 406309 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] Revert and fix "Revert "EditPage: Show EditFilterMergedContent hook errors in an errorbox""

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

Change 406309 merged by jenkins-bot:
[mediawiki/core@master] Revert and fix "Revert "EditPage: Show EditFilterMergedContent hook errors in an errorbox""

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

matmarex closed this task as Resolved.Jan 26 2018, 6:02 PM
matmarex assigned this task to Anomie.
matmarex edited projects, added MediaWiki-Page-editing; removed Patch-For-Review.