Last modified: 2012-04-12 14:00:09 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 T26177, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24177 - Links to anchors behave differently on page preview
Links to anchors behave differently on page preview
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.16.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-29 13:28 UTC by Hamilton Abreu
Modified: 2012-04-12 14:00 UTC (History)
3 users (show)

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


Attachments

Description Hamilton Abreu 2010-06-29 13:28:20 UTC
A link to an section heading, such as [[#Anchor|link to anchor]], does not behave properly when the page is being previewed. It produces a URL to the page's name but, at the end of the URL, instead of "#Anchor" being added, "&action=submit#Anchor" is added.
Comment 1 Roan Kattouw 2010-06-29 19:22:16 UTC
This is proper behavior. The generated HTML is something like <a href="#Anchor">link to anchor</a> , which links to #Anchor on the current page. It so happens that the URL of the current page ends in &action=submit , so the browser builds a URL that ends in &action=submit#Anchor .
Comment 2 Nemo 2010-07-01 15:18:08 UTC
I'm coming from mediawikiwiki: I've corrected in this manner: http://www.mediawiki.org/w/index.php?title=Help%3ALinks&action=historysubmit&diff=334915&oldid=334870 but maybe Hamilton Abreu's edit can be just reverted.
Comment 3 Hamilton Abreu 2010-07-01 20:32:44 UTC
The edit at mediawiki.org has been rolled back. So as to be clear, the issue was initially raised because I was following the anchor link by opening it in a new tab, rather than simply just clicking it. This, of course, comes from a habit acquired way before the "are you sure you want to navigate away from this page" warning. You send everything to new tabs, in order not to ever disrupt the edit while previewing it. I actually believe most users do the same, but anyway... the mentioned effect then ensues.
Comment 4 Hamilton Abreu 2010-07-01 20:48:53 UTC
For the benefit of anyone unaware of the effect, if the abbreviated anchor link is opened in a new tab during page preview of the edit, instead of jumping to the anchored section of the page the original text is again opened for editing, due to the &action=submit#Anchor ending of the URL.

If, instead of abbreviating the URL, the full pagename is used, then the original text (not the edit being previewed) is opened in the new tab and the browser jumps to the anchored section, if it existed in the original text. So, opening anchors in new tabs never fully works as one might initially have expected.

Thanks to all and apologies for the time I may have caused you to waste.

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


Navigation
Links