Last modified: 2014-09-23 22:56:01 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 T38348, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 36348 - Short IDs for sections
Short IDs for sections
Status: UNCONFIRMED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-30 02:17 UTC by mwh
Modified: 2014-09-23 22:56 UTC (History)
5 users (show)

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


Attachments
Patch for 1.18.3 (474 bytes, patch)
2012-04-30 02:17 UTC, mwh
Details
Patch for latest version from git (472 bytes, patch)
2012-11-21 05:56 UTC, mwh
Details
Patch for latest version from git (472 bytes, patch)
2012-11-21 05:57 UTC, mwh
Details

Description mwh 2012-04-30 02:17:35 UTC
Created attachment 10486 [details]
Patch for 1.18.3

Here is a patch, that append short "id" attribute to headlines.

It useful for easy short link creation to page section.
Comment 1 Daniel Friesen 2012-04-30 03:08:20 UTC
base64 encoded truncated md5? Not really what I'd pick for 'short' or 'intuitive'.

The string concatenation instead of modifying $attribs smells of bad coding style.

But more importantly. Taking over the <h#>'s id="" for this? That is a fairly short sighted decision. We have bugs open requesting that we move the existing id="" from the mw-headline to the <h#>. So I would reject this patch simply on those grounds.
Comment 2 mwh 2012-04-30 11:42:13 UTC
I just want short id for url #hash. Each section has <h1><span id="..."></span></h1> format. One of it is used for long urlencoded section's name, but we may use _second_ for short id.

I will be happy if someone add hook that'll be able to modify $attribs.


Sorry for bad style, I am not a coder. I want to illustrate my idea with that patch.
Comment 3 Andre Klapper 2012-05-01 13:45:16 UTC
[Please also flag the file as a patch so it can be found when querying. Thanks!]
Comment 4 mwh 2012-05-01 18:14:07 UTC
Thank you. Sorry for the reverse patch.
Comment 6 Sumana Harihareswara 2012-05-03 18:41:35 UTC
Thanks for the patch! Please feel free to get developer access

https://www.mediawiki.org/wiki/Developer_access

and submit this directly into our source control system:

https://www.mediawiki.org/wiki/Git/Workflow

If you have any questions, please let us know:

https://www.mediawiki.org/wiki/Communication
Comment 7 Max Semenik 2012-05-03 18:42:46 UTC
-patch-need-review, already reviewed in Comment 1.
Comment 8 Sumana Harihareswara 2012-07-20 18:02:31 UTC
Marking patch as reviewed.  CC'ing Kai Nissen in case he wants to comment on a11y grounds.
Comment 9 Andre Klapper 2012-10-19 20:45:51 UTC
mwh: In case you're still interested in this (hopefully), would you have time to follow the steps that Sumana provided in comment 6?
Comment 10 mwh 2012-11-21 05:56:27 UTC
Created attachment 11398 [details]
Patch for latest version from git

Sorry for incorrect direction in previous patch.
Comment 11 mwh 2012-11-21 05:57:50 UTC
Created attachment 11399 [details]
Patch for latest version from git

AAAARGH.
Comment 12 mwh 2012-11-21 05:59:25 UTC
(In reply to comment #9)
> mwh: In case you're still interested in this (hopefully), would you have time
> to follow the steps that Sumana provided in comment 6?

I am bad at coding (as you can see). Sorry.
Comment 13 Krinkle 2012-11-21 16:34:27 UTC
(In reply to comment #1)
> base64 encoded truncated md5? Not really what I'd pick for 'short' or
> 'intuitive'.
> 
> The string concatenation instead of modifying $attribs smells of bad coding
> style.
> 
> But more importantly. Taking over the <h#>'s id="" for this? That is a fairly
> short sighted decision. We have bugs open requesting that we move the existing
> id="" from the mw-headline to the <h#>. So I would reject this patch simply on
> those grounds.

I agree with Daniel, this seems very hacky and there is no clear use case. If you want to create a short url, create a truly short url, not just the section anchor (there are 100s of url shorteners out there, and Wikimedia is also working on one of their own).
Comment 14 mwh 2012-11-21 17:19:05 UTC
(In reply to comment #13)
> and Wikimedia is also working on one of their own

That's nice. If it will be native option.

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


Navigation
Links