Page MenuHomePhabricator

Template section edit issues: ghost sections and lost sections
Closed, ResolvedPublic


When a section header is displayed through a template, numbers in section edit links will become misaligned. See example URL. For section titles displayed through templates, the scope of numbering seems to be restricted to the template, and for other titles, numbering skips those inside templates. Because of this, when a section header is used in a template, edit links of all subsequent sections refer to a wrong secton, which can be quite annoying on long pages.

Version: unspecified
Severity: minor



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:55 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz11911.
bzimport added a subscriber: Unknown Object (MLST).

ssanbeg wrote:

Passing wiki sections into a template gives weird results, since the heading is produced by the template, even though there's no section there.

Currently, the best option is just to use HTML syntax, since that avoids the problem with misinterpreting =, and prevents the edit links from getting associated with the template.

The test case demostrates two separate issues:

  1. Templates may generate sections in the output which don't exist in the template, thus giving invalid section edit links pointing to the template
  2. Apparent sections in the page wikitext may be lost by passing them through to a template. The heading may reappear as a ghost template section (as per 1. above), or it may be removed altogether.

Changing the bug title to describe these two issues.