Page MenuHomePhabricator

Simplify the way we handle multiple licenses inside MobileFrontend to use core methods
Closed, ResolvedPublic0 Estimated Story Points

Description

Reading the comment from @Jdlrobson here: https://gerrit.wikimedia.org/r/#/c/234314/ I think it would be a good idea to add another way to add multiple licenses to a wiki. E.g. using an array of licenses or something similar.

QA steps

  1. Wikipedia

Go to https://it.m.wikipedia.org/wiki/Fliseryd and click edit. Type some text and hit next.
Expect to see By saving changes, you agree to the Terms of Use and agree to release your contribution under the CC BY-SA 3.0 e GFDL licenses.
Bonus points if the text is the Italian equivalent. That's another bug fixed if so.

  1. Wikinews

Go to https://en.m.wikinews.org/wiki/UK_pay_freeze_on_public_sector_employees_will_end_next_year and click edit. Type some text and hit next.
Expect to see "By saving changes, you agree to the Terms of Use and agree to release your contribution under the CC BY 2.5 license.

Screen Shot 2021-11-03 at 11.50.38 AM.png (474×2 px, 73 KB)

  1. Wikidata / Commons case

Go to https://commons.m.wikimedia.org/wiki/File:20.04.2018_Republic_Square,_Yerevan_1.jpg and click edit. Type some text and hit next.

Expect to see "By saving changes, you agree to the Terms
of Use and agree to release your contribution under the license."

QA Results - Prod

ACStatusDetails
1T111833#7554995
2T111833#7554995
3T111833#7554995

Event Timeline

Florian raised the priority of this task from to Needs Triage.
Florian updated the task description. (Show Details)
Florian added a project: MediaWiki-General.
Florian added subscribers: Florian, Jdlrobson.
Jdlrobson closed this task as Invalid.EditedJan 16 2021, 12:10 AM

Resolving as invalid in the mean time (associated patch doesnt seem to be the correct url)

Jdlrobson updated the task description. (Show Details)

T289401 will centralize this code to WikimediaMessages. It's possible the work there might resolve this so please subscribe if interested.

Change 734777 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/MobileFrontend@master] WIP: Drop special MobileFrontend licensing

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

Change 735684 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/WikimediaMessages@master] Drop unused code path

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

Jdlrobson raised the priority of this task from Low to Medium.Nov 3 2021, 6:52 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson set the point value for this task to 0.

This has turned out to a be a subtask of T289401

Jdlrobson added a subscriber: Jdrewniak.

Seems like there's some overlap between my task and a task @matmarex is working on, so I'll look to resolve both this issue and the editing team issue with Bartosz this week.

Change 734777 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Drop special MobileFrontend licensing

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

Change 735684 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMessages@master] Drop unused code path

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

matmarex added a subscriber: matmarex.

I haven't done any work related to this, and I'm not planning to work on it, sorry.

And as far as I can tell, we haven't done anything about the wgRightsUrl/wgRightsText config variables in MediaWiki. There are now some workarounds for Wikimedia wikis in the WikimediaMessages extension, but without those, core MediaWiki still doesn't support defining multiple licenses.

Jdlrobson renamed this task from Convert wgRightsUrl/wgRightsText into a better way to handle multiple Licenses to Simplify the way we handle multiple licenses inside MobileFrontend to use core methods.Nov 12 2021, 10:10 PM
Jdlrobson assigned this task to Edtadros.

This broke the copyright notice in the editor when editing outside of the main namespace. For example, while editing https://en.m.wikinews.org/wiki/User:Matma_Rex, there is no message.

image.png (2×3 px, 154 KB)

This broke the copyright notice in the editor when editing outside of the main namespace.

I think it's only the user namespace? It seems to be working fine on every other namespace I tested.

This appears to because there is no license on user pages in the footer (on desktop too) Any idea why that might be?
https://en.wikinews.org/w/index.php?title=User:Matma_Rex

Screen Shot 2021-11-29 at 4.59.51 PM.png (518×2 px, 85 KB)

Screen Shot 2021-11-29 at 5.01.12 PM.png (430×1 px, 55 KB)

So I think this was already misconfigured.

UPDATE:

This is an issue with global user pages, and not a regression.
The page references is a meta wiki user page, which has a different license so never worked (as the meta wiki license is different from all the wikis it displays on)

The copyright in the footer, is not shown for pages that don't exist for obvious reasons. See Skin::getFooterLinks
https://gerrit.wikimedia.org/g/mediawiki/core/+/12dbaa863859bd3874f47c2b8107e10c42bb7697/includes/skins/Skin.php#2504

This in turn means we can't work out the license for the user page in the editor.

I suggest opening a ticket against Global user pages, that should be using the SkinCopyrightFooter hook to inject the correct license for user pages that are global.

Alternatively, we should disable the edit link on these mobile pages like we do on desktop.

Thanks, I misdiagnosed that.

But that actually indicates a different issue… the licensing message in the editor is also not shown when creating a new page. For example: https://en.m.wikinews.org/wiki/Blahblahblah

image.png (2×3 px, 159 KB)

I'll submit a patch.

Change 742810 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/MobileFrontend@master] Display license in the editor even when not shown in read mode (e.g. creating new pages)

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

Jdlrobson removed a project: Patch-For-Review.

I'd rather track the new issue in a new task since Edward is already QAing a bunch of other stuff and I don't want to confuse him further. Have created T296791

Edtadros added a subscriber: Edtadros.

Test Result - Prod

Status: ✅ PASS
Environment: etwiki, enwikinews, commons
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1) Wikipedia

Go to https://it.m.wikipedia.org/wiki/Fliseryd and click edit. Type some text and hit next.
Expect to see By saving changes, you agree to the Terms of Use and agree to release your contribution under the CC BY-SA 3.0 e GFDL licenses.
Bonus points if the text is the Italian equivalent. That's another bug fixed if so.

Screen Shot 2021-12-07 at 3.04.40 PM.png (512×860 px, 55 KB)

Screen Shot 2021-12-07 at 3.04.32 PM.png (512×860 px, 60 KB)

✅ AC2) Wikinews
Go to https://en.m.wikinews.org/wiki/UK_pay_freeze_on_public_sector_employees_will_end_next_year and click edit. Type some text and hit next.
Expect to see "By saving changes, you agree to the Terms of Use and agree to release your contribution under the CC BY 2.5 license.

The page in the step above is protected. I used this instead.

Screen Shot 2021-12-07 at 3.11.14 PM.png (512×860 px, 57 KB)

✅ AC3) Wikidata / Commons case
Go to https://commons.m.wikimedia.org/wiki/File:20.04.2018_Republic_Square,_Yerevan_1.jpg and click edit. Type some text and hit next.

Expect to see "By saving changes, you agree to the Terms
of Use and agree to release your contribution under the license."

Screen Shot 2021-12-07 at 3.13.40 PM.png (512×860 px, 59 KB)

Edtadros updated the task description. (Show Details)