Page MenuHomePhabricator

Sitenotice should be parsed in context of [[MediaWiki:Sitenotice]], not of the page below
Open, LowPublic

Description

It seems that when parsing the sitenotice, the page it's shown on top of is used as parsing context (for {{PAGENAME}} etc.). I know you can't count on {{PAGENAME}} and friends to be meaningful in the sitenotice due to heavy caching, but there are more problems with parsing in the context of a random title:

  1. Subpage links like /foo don't point to [[MediaWiki:Sitenotice/foo]] but to [[Somerandompage/foo]] (if subpages are even enabled in the namespace in question)
  2. Links to other pages will show up as selflinks if it so happens that the sitenotice was reparsed while on top of the target page. This happened on fiwiki today

Version: 1.16.x
Severity: normal

Details

Reference
bz20870

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:53 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz20870.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #0 2009-09-29)

It seems that when parsing the sitenotice, the page it's shown on top of is
used as parsing context (for {{PAGENAME}} etc.). I know you can't count on
{{PAGENAME}} and friends to be meaningful in the sitenotice due to heavy
caching, but there are more problems with parsing in the context of a random
title: ...

  1. Links to other pages will show up as selflinks if it so happens that the

sitenotice was reparsed while on top of the target page. This happened on
fiwiki today

I can confirm this bug: it happened for one of my wikis (MW 1.15.1) today (2011-01-28), too (link in sitenotice to another page was rendered as self link, as if you are on that page).

On the other hand - when viewing or editing the target page x - even after refreshing, the sitenotice does not render the link to the (same) target page x as self link, but should do so. Seen on MW 1.16.1 installation.

It could be fixed easily, but there may be cache issues (I am not an expert in these cache things).

Can the experts please comment on this bug, or fix that?

It's 2014 now and the request for a fix is still standing for MW 1.23. Should a separate report be filed for this MediaWiki version?

(In reply to contrafibularity from comment #4)

It's 2014 now and the request for a fix is still standing for MW 1.23.
Should a separate report be filed for this MediaWiki version?

No. First there needs to be a fix for git master. After that exists, a "request to backport" flag can be set to backport it to 1.23.