Page MenuHomePhabricator

Remove uses of 'cols' and 'rows' preferences from extensions
Closed, ResolvedPublic

Description

The 'cols' and 'rows' preferences have been removed from core (see T26430), but they have been left in $wgDefaultUserOptions to avoid breaking extensions that still use them.

Remove all uses in extensions, replacing them by the values 25 (rows) and 80 (cols) or other values as required, then remove them from $wgDefaultUserOptions in core.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

What could be the extensions related to this?

Based on a quick search: AdvancedMeta, DynamicPageList, Favorites, MultiUpload, PageForms, SecureHTML, SemanticPageMaker. Search the code for 'getOption' or 'getIntOption' (or 'cols' or 'rows') to find the usages.

As the changes are made in more than one extension, should it be in a single commit?

As the changes are made in more than one extension, should it be in a single commit?

There will have to be one patch for each extension. You can't modify more than one Git repository in the same patch.

Change 332459 had a related patch set uploaded (by Amritsreekumar):
Remove the uses of 'rows' and 'cols' preferences from the extension Favorites

https://gerrit.wikimedia.org/r/332459

Change 332460 had a related patch set uploaded (by Amritsreekumar):
Remove uses of 'cols' and 'rows' preferences from AdvancedMeta

https://gerrit.wikimedia.org/r/332460

Change 332459 merged by jenkins-bot:
Remove the uses of 'rows' and 'cols' preferences from the extension Favorites

https://gerrit.wikimedia.org/r/332459

Change 332465 had a related patch set uploaded (by Amritsreekumar):
Replace the use of 'rows' and 'cols' preferences in the extension DynamicPagelist

https://gerrit.wikimedia.org/r/332465

Change 332466 had a related patch set uploaded (by Amritsreekumar):
Remove the uses of 'rows' and 'cols' preferences from the extension MultiUpload

https://gerrit.wikimedia.org/r/332466

Change 332466 merged by jenkins-bot:
Remove the uses of 'rows' and 'cols' preferences from the extension MultiUpload

https://gerrit.wikimedia.org/r/332466

Change 332465 merged by jenkins-bot:
Replace the use of 'rows' and 'cols' preferences

https://gerrit.wikimedia.org/r/332465

Change 332765 had a related patch set uploaded (by Amritsreekumar):
Remove the use of function $wgDefaultUserOptions

https://gerrit.wikimedia.org/r/332765

Change 332765 abandoned by Amritsreekumar:
Remove the use of function $wgDefaultUserOptions

https://gerrit.wikimedia.org/r/332765

I am not able to submit a patch in the extension SecureHTML for review as it showing that the project is read only, what is it that I can do? :)

I am not able to submit a patch in the extension SecureHTML for review as it showing that the project is read only, what is it that I can do? :)

The MW.org page for this extension says it's "stable", and there was a commit merged as recently as last week, but the Gerrit project description is "[ARCHIVED] MediaWiki extension SecureHTML". It was archived in rESHTedcd6731b736bdf647b0fc8b473283054b3b756d, with no explanation given.

@hashar, could you help us here? I'm not saying you were wrong to archive this extension, I'm just surprised that an extension marked "stable" on MW.org would be marked archived on Gerrit.

"Sort out SecureHTML extension" might be worth a separate task if it's more complicated?

The MW.org page for this extension says it's "stable"

https://www.mediawiki.org/wiki/Extension:SecureHTML has not seen changes since 2015.
However https://www.mediawiki.org/wiki/Extension:Secure_HTML is alive. And links to the same Gerrit repo...

It has been removed from CI via 88b0ecd815eecbcb30781d3abccc008851bcff57

commit 88b0ecd815eecbcb30781d3abccc008851bcff57
Author: Antoine Musso <hashar@free.fr>
Date:   Sat Jan 14 09:35:14 2017 +0100

    Deconfigure NewTalkGlobal and SecureHTML
    
    Both are archived extensions per
    https://gerrit.wikimedia.org/r/#/c/332025/
    
    Change-Id: Id11fae6e6bac9edb3ced9d88e7c722aa39e908be

Checking mediawiki.org https://www.mediawiki.org/wiki/Extension:SecureHTML shows a big: This extension has been archived.

So I am confused?

Checking mediawiki.org https://www.mediawiki.org/wiki/Extension:SecureHTML shows a big: This extension has been archived.

As Andre observed, https://www.mediawiki.org/wiki/Extension:Secure_HTML (marked stable) does link to this same Git repo..

So I am confused?

I think MW.org confused you. I added a box to https://www.mediawiki.org/wiki/Extension:SecureHTML to help explain the situation.

Change 333274 had a related patch set uploaded (by Hashar):
Restore SecureHTML

https://gerrit.wikimedia.org/r/333274

That was definitely confusing!!! Maybe we can set a redirect?

I have made mediawiki/extensions/SecureHTML active again in Gerrit and reenabled CI config.

One can add it back to mediawiki/extensions or it will be done with the next run.

Change 333274 merged by jenkins-bot:
Restore SecureHTML

https://gerrit.wikimedia.org/r/333274

Change 333343 had a related patch set uploaded (by Amritsreekumar):
Remove the uses of 'cols' and 'rows' preferences

https://gerrit.wikimedia.org/r/333343

Change 333343 merged by jenkins-bot:
Remove the uses of 'cols' and 'rows' preferences

https://gerrit.wikimedia.org/r/333343

Change 333349 had a related patch set uploaded (by Amritsreekumar):
Remove uses of 'cols' and 'rows' preferences

https://gerrit.wikimedia.org/r/333349

Change 333349 merged by jenkins-bot:
Remove uses of 'cols' and 'rows' preferences

https://gerrit.wikimedia.org/r/333349

@amritsreekumar: Do you plan to rebase https://gerrit.wikimedia.org/r/#/c/332460/ ? (Asking as that is the only open patch in this task.)

Change 332460 abandoned by Amritsreekumar:
Remove uses of 'cols' and 'rows' preferences from AdvancedMeta

https://gerrit.wikimedia.org/r/332460

I just checked https://phabricator.wikimedia.org/rMW0fa3413576751247586fe291c837fcedbba3c1f0 and https://p.defau.lt/?fgGU0StB4J9l0LC5GZq8AA

To me, above screenshot means that at least 3384 users of en.wp having default rowsize of 20 and 1552 users of en.wp having default rowsize of 50 are probably pissed off by this change. Add other settings, add other WMF wikis, number of users that were not using default settings were probably higher than 10k.
Question which can be asked here is: is 2 lines leaner mw code worthy of inconveniencing some 10k users on WMF projects?

I know that WMF is developing mediawiki with aim to enhance it, to make it better for users, no question asked here. But some changes piss of our users, one of them said to me that he left because he was annoyed with pop-up asking him something like: "Do you want to translate the article?"
I smiled, as I blocked this annoyance at least a year ago with adblocker, but, what to say to users who do not use ad blockers, who are not tech savvy enough to help themselves remove annoying "betterment" of mediawiki?

Do change mediawiki, but change it for the better, not for worse, harder to customize and ridden with annoying pop-ups and no easy available option to get rid of them.

is 2 lines leaner mw code worthy of inconveniencing some 10k users on WMF projects?

@SpeedyGonsales: The question is 19 months too late and unrelated to the task scope. :) The setting was already removed on WMF projects and users were informed (T26430#2935643).

This task is about extensions. See the list in T155153#2936980. Apart from DynamicPageList none of the listed extensions is deployed on WMF projects. The preference in DynamicPageList was already removed in https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/DynamicPageList/+/332465/ .

(On a general note, implying that all users are active and care is a bit unlikely; unneeded code creates maintenance costs for years to come.)

I can't find this in extensions. Should this be closed as resolved?

In T155153#4922943, @Zoranzoki21 wrote:

I can't find this in extensions. Should this be closed as resolved?

From https://codesearch.wmflabs.org/search/?q=getOption%5C(%5Cs.*(%27%7C%22)(rows%7Ccols)(%27%7C%22).*%5C)&i=nope&files=&repos= I spot three extensions not yet updated – MediaWiki-extensions-Form and MediaWiki-extensions-TinyMCE, and SecureHTML which doesn't have a project tag.

In T155153#4922943, @Zoranzoki21 wrote:

I can't find this in extensions. Should this be closed as resolved?

From https://codesearch.wmflabs.org/search/?q=getOption%5C(%5Cs.*(%27%7C%22)(rows%7Ccols)(%27%7C%22).*%5C)&i=nope&files=&repos= I spot three extensions not yet updated – MediaWiki-extensions-Form and MediaWiki-extensions-TinyMCE, and SecureHTML which doesn't have a project tag.

I will do other extensions which left.

Change 488429 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/Form@master] Remove uses of 'cols' and 'rows' preferences from Form extension

https://gerrit.wikimedia.org/r/488429

Change 488430 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/SecureHTML@master] Remove uses of 'cols' and 'rows' preferences from SecureHTML extension

https://gerrit.wikimedia.org/r/488430

Change 488431 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/TinyMCE@master] Remove uses of 'cols' and 'rows' preferences from TinyMCE extension

https://gerrit.wikimedia.org/r/488431

Change 488431 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/TinyMCE@master] Remove uses of 'cols' and 'rows' preferences from TinyMCE extension

https://gerrit.wikimedia.org/r/488431

Change 488429 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/Form@master] Remove uses of 'cols' and 'rows' preferences from Form extension

https://gerrit.wikimedia.org/r/488429

Change 488430 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/SecureHTML@master] Remove uses of 'cols' and 'rows' preferences from SecureHTML extension

https://gerrit.wikimedia.org/r/488430

Change 488429 merged by jenkins-bot:
[mediawiki/extensions/Form@master] Remove uses of 'cols' and 'rows' preferences from Form extension

https://gerrit.wikimedia.org/r/488429

Change 488431 merged by jenkins-bot:
[mediawiki/extensions/TinyMCE@master] Remove uses of 'cols' and 'rows' preferences from TinyMCE extension

https://gerrit.wikimedia.org/r/488431

Change 488430 merged by jenkins-bot:
[mediawiki/extensions/SecureHTML@master] Remove uses of 'cols' and 'rows' preferences from SecureHTML extension

https://gerrit.wikimedia.org/r/488430

Looking at https://codesearch.wmflabs.org/search/?q=(%27%7C%22)(rows%7Ccols)(%27%7C%22)&i=nope&files=&repos= (with a whole lot of reading ;-)) it looks like we should:

  • Drop $wgHiddenPrefs[] = 'cols'; from translatewiki's config.
  • Drop rows and cols from core's DefaultSettings.php (which will also drop the uses in mediawiki/services/parsoid)
  • Drop the 'rows' i18n message from core (only defined for the Lingala (ln) language now? Have asked the TWN experts.)

Change 588037 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[translatewiki@master] TranslateWikiSettings: Stop hiding 'cols', dropped from core ages ago

https://gerrit.wikimedia.org/r/588037

Change 588040 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] Stop defining legacy 'rows' and 'cols' options, ignored since MW 1.29

https://gerrit.wikimedia.org/r/588040

Change 588037 merged by jenkins-bot:
[translatewiki@master] TranslateWikiSettings: Stop hiding 'cols', dropped from core ages ago

https://gerrit.wikimedia.org/r/588037

Change 588040 merged by jenkins-bot:
[mediawiki/core@master] Stop defining legacy 'rows' and 'cols' options, ignored since MW 1.29

https://gerrit.wikimedia.org/r/588040

All patches merged or abandoned; closing. Thanks to Amritsreekumar, Hashar, Kizule and Jdforrester for your patches!

( https://codesearch.wmflabs.org/search/?q=(%27%7C%22)(rows%7Ccols)(%27%7C%22) still shows $cols = intval( $this->getUser()->getOption( 'cols' ) ); for extensions/PageForms/specials/PF_UploadForm.php; but no idea why because 1cab7cbb78c746b0ada6f0b101d1a19297874ec2 )