Page MenuHomePhabricator

Deletion of translated pages through the API should be prevented.
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

The selected page is deleted. This also removes the translation from the overview of available languages on the master page. However, the individual translated elements still exist.

The restoration of https://meta.wikimedia.org/w/index.php?title=The_Wikipedia_Library/es subsequently was not straightforward.

What should have happened instead?:

A permission error should have been thrown, to prevent this page from being deleted separately through the API. The behavior of the API should mimic the wiki-interface.

Event Timeline

Pppery renamed this task from Deletion API not detecting translated pages to Deletion of translated pages through the API should be prevented..Oct 1 2022, 8:21 PM

There are multiple issues highlighted in this report: One is deleting a translation page without its units (what is stated in the title); the other is restoring translation pages, which is an unrelated issue affecting restoration of pages deleted by FuzzyBot in the same way and should be handled with a separate ticket (and is arguably more important since it actually makes the workflow with the translation extension so much harder, requiring you to temporarily unmark the whole page from translation first, as outlined here).

As for the actual issue here, I agree it might be problematic to allow deleting the whole translation without the unit pages, but I'm noting here that this might complicate the nuking process when vandals create lots of bad translations.

The thing is there is no way to only mark the translation unit for deletion, <noinclude> would not work for the Translate extension.

There is:

{{#ifeq:{{NAMESPACE}}|Translations|<!-- this is the translation unit -->|<!-- this is the actual translated page -->}}

for example:

{{#ifeq:{{NAMESPACE}}|Translations|{{speedy|not a translation}}}}

Thanks, maybe there should be a template for substing the safe solution, and an abuse filter to warn direct usages of the deletion template.

Change 837234 had a related patch set uploaded (by Func; author: Func):

[mediawiki/extensions/Translate@master] Hooks: Check permission before deleting translation pages via API

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

The thing is there is no way to only mark the translation unit for deletion, <noinclude> would not work for the Translate extension.

While that is a problem, that is irrelevant to this task and more in the scope of T154183: Investigate ways to ease deletion tagging of translation unit pages.

Change 837234 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Hooks: Check permission before deleting translation pages via API

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

Pppery assigned this task to Func.
Pppery subscribed.

Assuming this task is resolved since the patch was merged.