Last modified: 2013-10-23 18:17:23 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 T35437, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33437 - Blank anchor [[#|anchor link]] should not link to the Main Page
Blank anchor [[#|anchor link]] should not link to the Main Page
Status: RESOLVED DUPLICATE of bug 17006
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.18.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-30 21:19 UTC by badon
Modified: 2013-10-23 18:17 UTC (History)
5 users (show)

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


Attachments

Description badon 2011-12-30 21:19:15 UTC
Blank anchor [[#|anchor link]] becomes non-blank <a href="/wiki/">anchor link</a> when it should become <a href="#">anchor link</a>

Demo:

https://www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=477242

Also occurs in the 1.18wmf branch. My plain 1.18 works correctly only because JavaScript is usurping the link, probably because of this bug (feature?!):

https://bugzilla.wikimedia.org/show_bug.cgi?id=28344

Demo (login with Demo/test):

http://www.coincompendium.com/w/index.php/CCT405
Comment 1 Krinkle 2011-12-30 21:23:01 UTC
The bug is in your 1.18.0 just like it is on mediawiki.org; JavaScript can hijack the mouse clicking action, which is what we do in the jQuery.makeCollapsible plugin, but that doesn't have a connection to this bug.
Comment 2 badon 2011-12-30 23:33:51 UTC
I should have rephrase to say that it SEEMS to work correctly, even though it actually isn't.
Comment 3 badon 2011-12-30 23:55:56 UTC
OK, I think I may have found a related bug, but I'm not sure how to test it any further. A blank anchor link will show up as black and bolded, with no normal link styling at all, when it appears on any of the Semantic Forms special pages. I'm not sure if it's a problem with Semantic Forms, or special pages in general because I don't know how to edit and test some ordinary special pages. 

Advice? 

Are special pages wiki links parsed differently from other namespaces?
Comment 4 badon 2011-12-31 00:04:36 UTC
It looks like it is also being hard-coded with bolding that can't be overridden with inline styling.
Comment 5 badon 2011-12-31 02:39:55 UTC
Nevermind about the bolding, etc. Since the anchor link is to the page the user is on, it is displayed as bold text instead of a link. That is normal behavior. I just didn't realize what was happening.
Comment 6 Helder 2012-01-04 11:31:46 UTC
Will bug 30327 be solved when this bug is fixed?
Comment 7 badon 2012-01-04 19:17:41 UTC
The link behavior will exactly match all other links on a wiki, once this bug is fixed. Bug 30327 complains about this:

"When the pointer is hovered...the cursor takes the form of an up-and-down arrow rather than the pointing-index-finger form".

And that will be corrected when this bug is fixed, because then you will just use [[#|Your link text here]] to produce links, and the link will work exactly like all other links, with the pointing-index-finger form - if that's the default that your browser and your wiki uses, as is normally the case. 

Of course, pointers can still be customized on the site itself using CSS or JavaScript, or by the user within the browser, once this bug is fixed. This bug shows a starting point for a temporary workaround:

https://bugzilla.wikimedia.org/show_bug.cgi?id=33432

If you want your collapse/expand toggles to appear like normal (Vector skin) links, put the following CSS in your MediaWiki:Common.css:

/* For mw-collapsible toggles to make them look like regular links */
/* :visited, :hover, and :active pseudoclasses must always be in that order! */
.pseudolink { cursor:pointer; color:#0645AD; }
.pseudolink:visited { color:#0B0080; }
.pseudolink:hover { text-decoration:underline; }
.pseudolink:active { color:#faa700; }

You can change those CSS parameters to suit your needs. Note that the ":visited" parameter does not work with MakeCollapsible toggles because you're not visiting anything when you click them, so your links will always look like fresh, unclicked links. But, you can used that class for other things on your site, so I included it for completeness.
Comment 8 badon 2012-01-04 19:20:45 UTC
I forgot to add that, in order to use that workaround CSS code, you need to style your toggle text like this:

<span class="pseudolink">Your toggle text</span>
Comment 9 Krinkle 2012-07-01 20:45:28 UTC
*** Bug 38103 has been marked as a duplicate of this bug. ***
Comment 10 Krinkle 2012-07-01 20:48:36 UTC

*** This bug has been marked as a duplicate of bug 17006 ***

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


Navigation
Links