Last modified: 2012-01-13 23:44:35 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 T8833, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6833 - Link to nonexistent superpages on subpages
Link to nonexistent superpages on subpages
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/Wikipedi...
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-27 19:01 UTC by Timwi
Modified: 2012-01-13 23:44 UTC (History)
4 users (show)

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


Attachments
Patch to fix and allow extended behavior of subpage linkes (1.46 KB, patch)
2008-06-06 23:48 UTC, Edward Rudd
Details

Description Timwi 2006-07-27 19:01:38 UTC
Take a look at:

http://en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost/2006-05-15/Tron_appeal

In the top-right corner, you see:

    < Wikipedia:Wikipedia Signpost | 2006-05-15

i.e. two links.

So far so good. Now comes the actual bug:

http://en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost/2006-07-24/Skutt_suit

It says:

    < Wikipedia:Wikipedia Signpost

The link to 2006-07-24 is missing.

The reason is probably that the page [[Wikipedia:Wikipedia Signpost/2006-07-24]]
doesn't exist. However, I believe it should still display the link, but in red
(as is usual for non-existing pages).
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-07-27 19:07:14 UTC
This appears to be intentional.  The suggested change is certainly reasonable,
though.
Comment 2 Edward Rudd 2008-06-06 14:09:25 UTC
The change required is in Skin.php (Media wiki 1.12) in the method subPageSubtitle in the Skin class.

the line that reads

if(preg_match('/class="new"/i',$getlink)) { break; } # this is a hack, but it saves time
should be commented out if you wish for missing subpages to be linked.
OR
changed to 
  if(preg_match('/class="new"/i',$getlink)) { # this is a hack, but it saves time
      $growinglink.='/';
      continue;
  }

If you wish them to be skipped. As right now it skips more than it should..example.

I have
Software:Projects/Tickets/Testing/TicketCreation/2008-01-02

the "Testing" page does not exists.

When on the 2008-01-02 page (a result of the testing described in the parent) I have this breadcrumb.

Software:Projects | Tickets

the TicketCreation page is not linked even though it exists.

Also if I don't have the Software:Projects page I have no subpage links at all.
Comment 3 Edward Rudd 2008-06-06 23:48:53 UTC
Created attachment 4963 [details]
Patch to fix and allow extended behavior of subpage linkes

Patch to fix and allow extended behavior of subpage linkes

I've attached a patch that fixes the implementation of subPageSubtitle so that
it will not abruptly end if there are "missing" pages in the middle of a sub
page hierarchy. 

Also it adds a new config variable of $wgShowNonExistingSubPages which defaults
to false.  when set to true the non-existing subpages will be displayed.
Comment 4 Alexandre Emsenhuber [IAlex] 2009-07-27 16:28:23 UTC
I already changed it differently in r33652, it doesn't stop on missing page, but will skip it.
Comment 5 Sumana Harihareswara 2011-11-09 20:09:59 UTC
Adding the "need-review" keyword for patches that need review by developers.  Edward, thank you for your patch, and sorry it's taken so long for a response on this!
Comment 6 Gabriel Wicke 2012-01-13 23:37:50 UTC
This should be fixed as indicated in comment #4. Please reopen if this is not the case.
Comment 7 Gabriel Wicke 2012-01-13 23:44:35 UTC
Oh, Edward- if you would like to hack on the new parser we are currently working on, please see https://www.mediawiki.org/wiki/Future/Parser_development. And thank you for your patch, even if it was not used in the end!

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


Navigation
Links