Last modified: 2010-11-06 22:27:47 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 T25240, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23240 - add a name and an id to the namespace selector form in the watchlist page
add a name and an id to the namespace selector form in the watchlist page
Status: VERIFIED FIXED
Product: MediaWiki
Classification: Unclassified
Watchlist (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-19 12:04 UTC by Waldir
Modified: 2010-11-06 22:27 UTC (History)
2 users (show)

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


Attachments
this patch adds a name and an id attributes to the form element that allows selecting a namespace in the watchlist page (538 bytes, patch)
2010-04-19 12:04 UTC, Waldir
Details

Description Waldir 2010-04-19 12:04:27 UTC
Created attachment 7305 [details]
this patch adds a name and an id attributes to the form element that allows selecting a namespace in the watchlist page

Background (skip if you're impatient):
I tried moving a script that works on the watchlist page from en.wikipedia to meta, but it breaks there; this is because it uses the namespace selector form, which, having no id or name, has to be selected using its index. This works fine on most wikis, but it's very fragile, and indeed in meta there's an extra form before that one (a button to mark all pages as visited), which makes its index be 1 instead of 0.

I am adding a patch that adds a name and an id to the namespace selector form, but please bear in mind that:
1) It's my first mediawiki patch
2) I couldn't find the file browsing svn; I used the version on the docs, at http://svn.wikimedia.org/doc/SpecialWatchlist_8php-source.html (I assume it is up to date; for reference, the revision number is r62890 as I write this)
3) I used WinMerge to generate the patch, and I'm not sure about the configurations. It should be ok, but please double-check
4) I don't know about mediawiki php naming conventions; I tried to guide myself by the other entries in the SpecialWatchlist.php file
5) I also made another change that may or may not break something: I removed a name="dummy" from the "enotif_reset" submit button. I'm not sure why it was there, and I'm not sure the function Xml::submitButton() can be called without its second argument, but I thought it could be something someone forgot to remove.

Sorry for the lengthy bug.
Comment 1 Roan Kattouw 2010-04-19 14:12:02 UTC
Modified version of patch applied by hand in r65278. Changed ID to mw-watchlist-form-namespaceselector to clarify it doesn't refer to the namespace selector itself.

The patch you attached was not in unified diff format and was against an old revision, which is why it was pretty much useless for me.
Comment 2 Waldir 2010-04-19 18:38:14 UTC
(In reply to comment #1)
> Modified version of patch applied by hand in r65278. 
Great, thanks!

> The patch you attached was not in unified diff format and was against an old
> revision, which is why it was pretty much useless for me.
Exactly, that's what I said in my bug report (maybe tl;dr?). I would say that this shows a need to have clearer or easier-to-find instructions on 1) how to browse the svn to find a given piece of the code, and 2) how to submit a patch in bugzilla (a simple warning to use unified format in the attachment form would already be an enhancement). I think bugs with (useful) patches make the life easier for you devs, so you're only helping yourselves by helping us help you :)

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


Navigation
Links