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).
|Open||None||T278158 File links and transclusions to redirects show up twice on listings|
|Open||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|
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.