Copyright messages in ext.visualEditor.data (VisualEditorDataModule) are parsed without the interface flag.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | None | T340453 [Epic] FY 2023-24 Growth Maintenance Work | |||
Open | None | T325082 Eslint: configure browser compatibility | |||
Open | None | T367429 [Epic] FY 2024-25 Growth Maintenance Work | |||
In Progress | None | T298751 Reduce db queries in load.php calls | |||
Resolved | matmarex | T189229 VisualEditorDataModule spends significant time in hot startup module | |||
Resolved | matmarex | T298822 Copyright messages in ext.visualEditor.data (VisualEditorDataModule) are parsed without the interface flag |
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()
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
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.
Change 752237 merged by jenkins-bot:
[mediawiki/core@master] EditPage: Allow passing context to getCopyrightWarning()
Change 752238 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Move copyright warning message parsing from RL module to API