Page MenuHomePhabricator

Special:LonelyPages (Orphaned Pages) does not contain lonely pages with selflink
Open, Needs TriagePublic

Description

Page Foo contains template {{Bar}},
template:Bar contains {{{1}}}

page Foo is not linked from any other page, only selflinked via template, but is not listed at Special:LonelyPages

This is problem on wiktionaries, where are e.g. declension tables containing infinitives...

https://cs.wiktionary.org/wiki/TEsT

Event Timeline

Aklapper renamed this task from Special:lonelypages does not contain lonely pages with selflink to Special:LonelyPages (Orphaned Pages) does not contain lonely pages with selflink.Nov 7 2016, 11:44 AM

Cause of the issue

Currently, this maintenance page is built on the following query:

SELECT page_namespace AS "namespace",page_title AS "title",page_title AS "value"

FROM page
LEFT JOIN pagelinks ON ((pl_namespace = page_namespace) AND (pl_title = page_title))
LEFT JOIN templatelinks ON ((tl_namespace = page_namespace) AND (tl_title = page_title))

WHERE (pl_namespace IS NULL) AND page_namespace IN ('0','250','252') AND page_is_redirect = '0' AND (tl_namespace IS NULL)

ORDER BY page_namespace,page_title

This query takes all the page and will add information from the tables storing links. When no row is found in a table, the LEFT JOIN operation return NULL values for the columns. This technique is used to identify the page whithout any link from a page or a template.

As such, links to itself are not detected, as they are well recorded in the links tables.

This technique allows to generate in one query the report.

Fixing this would degrade the performance of the query to accommodate an edge case. While I understand that this edge case may be common on Wiktionary, I'm not sure I understand why anyone would use Special:LonelyPages on Wiktionary anyway. Unlike on Wikipedia, there is nothing wrong with a page being an orphan on Wiktionary. Also, the example provided in the description no longer exists, so I can't really understand the use case here. Why do some pages on Wiktionary only link to themselves?

Fixing this would degrade the performance of the query to accommodate an edge case. While I understand that this edge case may be common on Wiktionary, I'm not sure I understand why anyone would use Special:LonelyPages on Wiktionary anyway. Unlike on Wikipedia, there is nothing wrong with a page being an orphan on Wiktionary. Also, the example provided in the description no longer exists, so I can't really understand the use case here. Why do some pages on Wiktionary only link to themselves?

e.g. searching for translations or synonyms missing in pages.

And why are linking to themselves?
Lets have article [[pizza]]. And add translations to this article. Wait, how is pizza called in many other languages? https://en.wiktionary.org/wiki/pizza#Translations

@JAnD: Thanks for the explanations. I think I understand this better now. It sounds like the case of an article only linking to itself is fairly rare, though, so if fixing this bug significantly degrades the performance of the query, I would lean towards declining. We should run a couple test queries and see what the difference is.