Last modified: 2010-05-15 15:59:39 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14764, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12764 - Special:LonelyPages shows transcluded pages
Special:LonelyPages shows transcluded pages
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.11.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-23 20:23 UTC by Jeremy Solt
Modified: 2010-05-15 15:59 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Possible patch (1.30 KB, text/plain)
2008-01-24 14:35 UTC, Jeremy Solt
Details
Introduces the desired effect, and also updates the description of Special:Lonelypages (1.88 KB, patch)
2008-01-24 16:03 UTC, Huji
Details

Description Jeremy Solt 2008-01-23 20:23:41 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.
Comment 1 Huji 2008-01-24 12:04:09 UTC
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.
Comment 2 Jeremy Solt 2008-01-24 14:31:17 UTC
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
Comment 3 Jeremy Solt 2008-01-24 14:35:09 UTC
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 4 Huji 2008-01-24 15:53:04 UTC
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.
Comment 5 Huji 2008-01-24 16:03:22 UTC
Created attachment 4576 [details]
Introduces the desired effect, and also updates the description of Special:Lonelypages

This patch adds the requested feature.
Comment 6 Jeremy Solt 2008-01-24 19:57:17 UTC
(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.
Comment 7 Huji 2008-10-24 13:34:47 UTC
Applied with r42472.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links