Page MenuHomePhabricator

{{msgnw:...}} (PPFrame::RECOVER_ORIG) doesn't nowiki xml-style extension tags
Closed, ResolvedPublic

Description

Screenshot of the "whatlinkshere" page

For images/files that are included within the "gallery" tag, the server incorrectly states that the file is used by subpages of the main page that contains the gallery.

Here's an example (I've attached a screenshot that illustrates the problem as well.)
http://tmbw.net/wiki/Special:WhatLinksHere/File:Birdhouse_Promo_sticker.png

This file (Birdhouse_Promo_sticker.png) is used within a gallery tag on "Birdhouse In Your Soul (EP)". It is NOT used at all on the subpage "Birdhouse In Your Soul (EP)/Release Details". Yet, when i go to whatlinkshere for the image, it shows that it is used on both pages.

This is just an example, and is not an isolated incident.


Version: 1.23.0
Severity: normal

Attached:

whatlinkshere.png (342×760 px, 24 KB)

Details

Reference
bz22683

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:10 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz22683.

Its because you include the basepage in the subpage.
{{Album Release Details Header}} includes {{msgnw:{{BASEPAGENAME}}}} into a variable, which has the gallery (apperently the nowikiness does not apply to <gallery>. that might be a bug). Thus in a sense the image is really on that page.

Oh you are exactly right, Bawolff. Thank you for taking the time to investigate it in-depth like you did. I've done some further testing on my end, and you are correct that it's a problem with the {{msgnw}}.

Interestingly, if i have two images on a page (one in a gallery / one not in a gallery), it will show the one in the gallery as being linked. However, the image that isn't in the gallery does not show up in the "whatlinkshere" page (and this is the proper behavior).

So, it looks like you're right that the "nowikiness" isn't being applied to the gallery tag, but it needs to be.

Thanks again for digging.

Needs adjust of header or making INVALID?

Possibly a wontfix. msgnw is really not used for anything afaik, and mostly kept for back compat. Do we really want to mess with that back compat?

Basic issue appears to be that msgnw uses PPFrame::RECOVER_ORIG, which doesn't recover xml-style extension tags.

Change 123516 had a related patch set uploaded by Jackmcbarn:
Make RECOVER_ORIG preserve extension tags

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

(In reply to Bawolff (Brian Wolff) from comment #4)

Possibly a wontfix. msgnw is really not used for anything afaik, and mostly
kept for back compat. Do we really want to mess with that back compat?

For the record:
[01:22] <bawolff> present me thinks the backwards compatibility concerns that past me had were overrated

cscott-free: oh wow, that's black magic
***cscott-free makes the sign of the cross
cscott-free: i believe in fixing old brokenness
cscott-free: parsoid doesn't implement <gallery>, RECOVER_ORIG, or msgnw currently -- so making the thing that we eventually have to implement more sane is a plus
cscott-free: (parsoid currently uses the PHP preprocessor for many things, including extensions and magic words)

Change 123516 merged by jenkins-bot:
Make RECOVER_ORIG preserve extension tags

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