Page MenuHomePhabricator

Concentrate content related error messages in one place
Open, LowPublic

Description

Parser function extensions, templates, and others may render error messages inline in pages. They have issues:

  1. They are usually in the user interface language but inserted into text in the page language which may
    1. cause cache splits
    2. bewilder users.
  2. They are styled inconsistently and individually, making CSSes unnecessarily bulky.
  3. Some may appear only on previews during section editing and not on the entire page, and vice versa.
  4. Since they may appear deep down somewhere, below a users will to scroll, they may go unnoticed by editor causing them.

So as to address some of these issues, let me suggest to collect these messages in a central place (container) which for page/section previews should be in the beginning of the area initially visible to the user.

We want to keep markers in the places where the errors are in the page, so make them use a bidirectional linking scheme similar or even identical to the one used for footnotes.

For normal page views, skins may decide where to render them. There needs to be only one central, skinable style to render the error messages, unburdening extensions and templates from dealing with local CSS and/or inline styles.

This suggestion was inspired by discussions on T114057 and the "balanced templates" RFC.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

Purodha raised the priority of this task from to Needs Triage.
Purodha updated the task description. (Show Details)
Purodha subscribed.

Hi @Purodha. For future reference, please associate at least one project with a task, otherwise nobody can find a task when searching in the corresponding project(s). Thanks!
I'm adding MediaWiki-General-or-Unknown here.

We already have a notion of parser warnings. They are shown at top of page during preview (expensive parser function warning uses it for example)

All inline errors should use the error class (so #iferror picks it up). I dont see why any more styling beyond that is needed

Content lang vs user lang is something that maybe we should just standardize one as the proper way of doing it. There is arguments for/against both, but as long as the extension is properly using the language from the parser as the user language, the cache wont be inconsistent