Page MenuHomePhabricator

Special page transclusions should be recorded in the templatelinks table
Open, Needs TriagePublic

Description

We have a tracking mechanism, so why not use it?

It's not a trivial change because it introduces pseudo-namespaces to the linktarget table, but I don't think it breaks any contract. The table is the DB equivalent of the LinkTarget class, which can represent special pages.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

linktarget table is similar to LinkTarget class but a bit different, most notably it doesn't have fragment. That being said, linktarget explicitly have signed integer for namespace datatype explicitly for this usecase so in paper at least, it should be okay. But the table is quite massive still in commons. I think it would work to add it but once we do a clean up of commons and some large wikis by flattening template trees a bit and then sure thing.

I don't think this would affect table sizes. Special page transclusions are pretty rare, and specials pages themselves can't record further transclusions.

yeah but I'm not 100% sure, you never know how frequently they have been used. If we get some numbers to get a sense, that'd be amazing

A search for {{Special: returns Wikipedias from ab to id in its first 5K results (which I think is all you can get via Global Search). That includes the English, German, French, Spanish, Arabic Wikipedias and Commons. It doesn't account for localized namespaces, and there could be outlier wikis, but I'd say it's suggestive of the total number being pretty low.