Last modified: 2010-05-15 15:59:39 UTC
The orphaned articles page shows pages that have been trasncluded into other pages exclusively. 1. Create a page that has no incoming links 2. Transclude that page into another page Actual Results: Page shows up as Orphaned. You have to go to the page, then click the "what links here" link to see that it's been transcluded (i.e., not really orphaned) Expected Results: Page does not show up as orphaned.
This is because lonely pages are found by querying pagelinks table, and this table is supposed to store the links; here is the list of its fields: pl_from int(10) unsigned NO PRI 0 pl_namespace int(11) NO PRI 0 pl_title varchar(255) NO PRI I suppose, in order to support for translusions gettings listed on this table, at least one new column should be added (to distinguish links from transclusions). Another idea is not to store the transclusions in the pagelinks table, but to use the same method used by SpecialWhatlinkshere to exclude orphan pages which are transcluded somewhere. The latter method may not be cost-effective though.
It appears that transcluded pages are stored in the templatelinks table. I'm not sure what the performance ramifications would be, but perhaps the LonelyPages query could be modified to also check the templatelinks table to determine if these pages pages are exclusively transcluded. Query might look like this: SELECT <what you need> FROM <pagetable> LEFT JOIN <pagelinktable> ON page_namespace=pl_namespace AND page_title=pl_title LEFT JOIN <templatelinktable> ON page_namespace=tl_namespace AND page_title=tl_title WHERE pl_namespace IS NULL AND page_namespace=<correct namespace> AND page_is_redirect=0 AND tl_namespace IS NULL
Created attachment 4575 [details] Possible patch This is my proposed patch, based on the 1.11.0 code, simply added a join to another table to hopefully, correctly identify articles that are not linked to, but are part of (transcluded into) other articles.
Comment on attachment 4575 [details] Possible patch What you uploaded was not a patch, but a section of code. I'll upload the patch as soon a I can.
Created attachment 4576 [details] Introduces the desired effect, and also updates the description of Special:Lonelypages This patch adds the requested feature.
(In reply to comment #4) > (From update of attachment 4575 [details]) > What you uploaded was not a patch, but a section of code. I'll upload the patch > as soon a I can. > Thanks, kinda new to this whole thing.
Applied with r42472.