Add il_direct_link to imagelinks and tl_direct_link to templates links to allow Special:WhatLinksHere and file pages to skip items that are not actual links on the page (like file links to redirects).
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Add *_direct_link to imagelinks and templatelinks | mediawiki/core | master | +373 -31 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T278158 File links and transclusions to redirects show up twice on listings | |||
Open | Feature | None | T278973 Add a way to differentiate transcluding a redirect and transcluding a redirect and its target | ||
Declined | None | T278236 Add *_direct_link to imagelinks and templatelinks |
Event Timeline
Change 674348 had a related patch set uploaded (by BrandonXLF; owner: BrandonXLF):
[mediawiki/core@master] Add *_direct_link to imagelinks and templatelinks
What are you trying to achieve with this change? I am especially concerned with adding more things to the already massive templatelinks table, which is now one of the top3 tables in size.
Please don't do this.
- *links tables are massive and messy and bound to break wikis (specially commons and enwiki), pagelinks table is already bigger than revision table in enwiki. We should normalize these tables first (T222224: RFC: Normalize MediaWiki link tables)
- This seems to be a bug/feature in the interface, Whatlinkshere can simply strip out duplicate entries when showing to users (either through SELECT DISTINCT or other ways) instead of adding a new column on a table with billions of rows and adding potentially tens of gigabytes of data to innodb buffer pool and other places.
That mostly works, but there are still issues if it's done that way. Let's say template A redirects to template B. If page 1 transcludes template A and template B, but page 2 just transcludes template A, they will appear the same in the templatelinks table, making it impossible for WhatLinksHere to correctly display links.
@BrandonXLF will https://phabricator.wikimedia.org/T278973#6972122 address this request as well?
I am going to close this per: T278236#6940822
In summary, *link tables do require lots of work pre work before we can start adding more things to them.
Please re-open if you think this needs to stay open.