Page MenuHomePhabricator

Copyright messages in ext.visualEditor.data (VisualEditorDataModule) are parsed without the interface flag
Closed, ResolvedPublic

Description

Copyright messages in ext.visualEditor.data (VisualEditorDataModule) are parsed without the interface flag.

Related Objects

StatusSubtypeAssignedTask
OpenNone
ResolvedNone
OpenNone
ResolvedUrbanecm_WMF
OpenNone
OpenNone
ResolvedUrbanecm_WMF
OpenNone
OpenNone
ResolvedCyndymediawiksim
ResolvedUrbanecm_WMF
ResolvedUrbanecm_WMF
Resolvedkostajh
ResolvedNone
ResolvedNone
In ProgressNone
Resolvedmatmarex
Resolvedmatmarex

Event Timeline

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

[mediawiki/core@master] EditPage: Allow passing context to getCopyrightWarning()

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

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

[mediawiki/extensions/VisualEditor@master] Pass context to EditPage::getCopyrightWarning() for proper message parsing

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

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

[mediawiki/core@master] EditPage: Allow passing context to getCopyrightWarning()

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

I think deprecating onEditPageCopyrightWarning would be neat, that hook was very flexible indeed. One way to handle the JsonConfig use case (mentioned above in CR) is to display its custom license through a page notice instead. For pages that VE supports, this would then already work as it fetches page notice metadata already.

This would also have the benefit of informing editors more active attention about a page's license being unusual and different from the wikis' default license (e.g. Wikidata and Wikinews are fine since they set their license sitewide).

On the other hand, licensing is pretty core to MW, so recognising it formally as a page-level concept in its own right seems worthwhile long-term, not just in the way we do today in this hook with some raw text, but also properly as machine-readable metadata. If we accomplish that, then we might also fix the akward situation where e.g. Commons reports CC BY-SA in <head> even for content in the Data-namespace, and also for File-pages regardless of which file. (I guess it's a separate question whether we want file descriptions to follow file license.. so may not for that case, but the Data-namespace would make sense to recognise and treat the same way as pages on Wikidata would be).

If we later decide then that we want to promote that vian a little page notice, we can still do that in core. So.. maybe the direction is to have VE fetch copyright notice in the same req as other page-level metadata. Having said that, we could still cache its parser output in the same way as you proposed for the DataModule, for the common case of it being the default one for the current site.

So.. maybe the direction is to have VE fetch copyright notice in the same req as other page-level metadata.

Yes, that's what I was also thinking. Done.

Change 752237 merged by jenkins-bot:

[mediawiki/core@master] EditPage: Allow passing context to getCopyrightWarning()

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

Change 752238 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Move copyright warning message parsing from RL module to API

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