Last modified: 2012-09-19 21:00:50 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 T38094, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 36094 - Default to ON for (proofreadpage-showheaders) @ enwikisource
Default to ON for (proofreadpage-showheaders) @ enwikisource
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Site requests (Other open bugs)
wmf-deployment
All All
: High enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: shell
Depends on:
Blocks: Wikisource
  Show dependency treegraph
 
Reported: 2012-04-19 14:55 UTC by billinghurst
Modified: 2012-09-19 21:00 UTC (History)
2 users (show)

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


Attachments

Description billinghurst 2012-04-19 14:55:41 UTC
The recent upgrade to 1.20wmf has added to the Editing tab, what some wikisources had as a gadget, primarily the ability to set a toggle display header.

At English Wikisource, the gadget was set to be on by default, and the new option is off by default.  Would the local settings for enwikisource please be updated to now have this gadget on.
Comment 1 Sam Reed (reedy) 2012-06-01 19:43:58 UTC
That preference doesn't exist in trunk
Comment 2 MZMcBride 2012-06-02 02:21:00 UTC
(In reply to comment #1)
> That preference doesn't exist in trunk

It's in an extension (cf. <https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114004>). At what point was Wikimedia's git branch for this extension created?

And more generally, I'm not sure how user prefs are set from an extension. Do you use https://www.mediawiki.org/wiki/Manual:$wgDefaultUserOptions or some other method?
Comment 3 billinghurst 2012-06-02 02:29:03 UTC
Link to a see also in bugzilla

Also, to link to where the preference used to sit within enWS
https://en.wikisource.org/w/index.php?title=MediaWiki:Gadget-pr_headers.js
Comment 4 MZMcBride 2012-06-02 03:05:38 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > That preference doesn't exist in trunk
> 
> It's in an extension (cf.
> <https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114004>). At what point
> was Wikimedia's git branch for this extension created?
> 
> And more generally, I'm not sure how user prefs are set from an extension. Do
> you use https://www.mediawiki.org/wiki/Manual:$wgDefaultUserOptions or some
> other method?

So it looks like r114004 got reverted by r114398. Then the Git migration happened. Then Reedy moved the JS to the modules directory in this rev: <https://gerrit.wikimedia.org/r/6340>. That's where they are now.

Looking at <https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/ProofreadPage.git;a=blob;f=modules/ext.proofreadpage.page/ext.proofreadpage.page.js;h=8de9532b7e9e8813211ca076ae20efdbdba05b03;hb=a86dd67fbecea2078cc81badd8222ed05499f876> and <https://bits.wikimedia.org/en.wikisource.org/load.php?debug=true&lang=en&modules=ext.proofreadpage.page&only=scripts&skin=monobook&*>, we can see that the following code is present currently:

---
		if ( mw.user.options.get( 'proofreadpage-showheaders' ) ) {
			pr_reset_size();
		} else {
			pr_toggle_visibility();
		}
---

So this bug is largely invalid. Local Wikisource administrators should continue to use Common.js or a user JavaScript gadget (preferably a gadget) to override this on a site-wide or per-user basis. If/when the code from r114004 is pulled into Git, this bug can be re-opened or a new bug can be filed.
Comment 5 MZMcBride 2012-06-02 03:19:29 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > That preference doesn't exist in trunk
> > 
> > It's in an extension (cf.
> > <https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114004>). At what point
> > was Wikimedia's git branch for this extension created?
> > 
> > And more generally, I'm not sure how user prefs are set from an extension. Do
> > you use https://www.mediawiki.org/wiki/Manual:$wgDefaultUserOptions or some
> > other method?
> 
> So it looks like r114004 got reverted by r114398. Then the Git migration
> happened. Then Reedy moved the JS to the modules directory in this rev:
> <https://gerrit.wikimedia.org/r/6340>. That's where they are now.

Okay, just kidding. While r114398 reverted r114004, Roan remerged the code in <https://gerrit.wikimedia.org/r/3466>.

The preference can be viewed here: <https://en.wikisource.org/wiki/Special:Preferences#mw-prefsection-editing>. It reads "Show header and footer fields...". The current default is OFF. The English Wikisource would like for the default to be ON.

So for Reedy, the question is: how is a default user option from an extension like this set and can it be switched for the English Wikisource?

(It may also be worth considering whether the extension's default to "off" is wise, but that's really a separate bug.)

Re-opening for now.
Comment 7 Sam Reed (reedy) 2012-06-02 14:06:29 UTC
 elseif ( $wgDBname == 'enwikisource' || $wgDBname == 'svwikisource' ) {
	$wgDefaultUserOptions['proofreadpage-showheaders'] = 1;
}
Comment 8 MZMcBride 2012-06-02 14:08:35 UTC
Looks fixed to me, thanks Reedy!

Generally an array of wiki databases or some kind of configuration variable would better here, as I imagine other Wikisourcen are going to request this type of thing, but that can be implemented later.
Comment 9 billinghurst 2012-06-02 14:19:59 UTC
Checked on spare account and functioning for me.

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


Navigation
Links