Page MenuHomePhabricator

GlobalRename and move-subpages can move translatable pages without their components
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

On Meta-Wiki, the user "Patafisik" was renamed to "Una tantum". This moved the page https://meta.wikimedia.org/wiki/User:Patafisik/Wikicaches to https://meta.wikimedia.org/wiki/User:Una_tantum/Wikicaches and its translation subpages, without moving any of the tunits, which broke things horribly.

When I attempted to clean up the mess by removing the page from translation and then moving it back to the original name ticking "move subpages", the result was that subpages like https://meta.wikimedia.org/w/index.php?title=User:Patafisik/Wikicaches/Newbies&redirect=no were also moved, but not their translations or their tunits. This didn't break anything not already broken by the first move, but it could in a different context have caused the same bug.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
abi_ triaged this task as Medium priority.Aug 8 2024, 8:17 AM
abi_ moved this task from Backlog to cross projects on the MediaWiki-extensions-Translate board.

Change #1208066 had a related patch set uploaded (by Pppery; author: Pppery):

[mediawiki/extensions/Translate@master] Block external attempts to move translatable pages

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

abi_ subscribed.

Change #1208066 had a related patch set uploaded (by Pppery; author: Pppery):

[mediawiki/extensions/Translate@master] Block external attempts to move translatable pages

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

With this patch applied, renaming a user that has translatable pages under the user page I see the following errors:

image.png (1,025×681 px, 92 KB)

The user rename worked but the translatable page was not moved.

Change #1208066 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Block external attempts to move translatable pages

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

@Pppery Can you try renaming: https://meta.wikimedia.org/wiki/User:APatro_(WMF) that has translatable pages under it. It should no longer be possible.

Okay, I think that worked as I intended it to:

It moved the base page successfully (moving subpages is done after the base page move succeeds and never blocks the base page from being moved)

image.png (1,227×258 px, 115 KB)

It seems to have moved all of the nontranslatable subpages and produced warnings saying it couldn't move any translatable subpages.

I note it did move message bundles, though, like https://meta.wikimedia.org/wiki/User:APatro_(WMF)/2/MessageBundleDemoForever. Probably it shouldn't. I should write a follow-up for that.

Change #1216191 had a related patch set uploaded (by Pppery; author: Pppery):

[mediawiki/extensions/Translate@master] Block manual moves of message bundles too

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

Nikerabbit set the point value for this task to 2.
Nikerabbit subscribed.

Moving back as there is more to review.

Change #1216191 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Block manual moves of message bundles too

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

@Pppery This should be ready for another round of testing. Message bundles should be handled too.

Change #1240594 had a related patch set uploaded (by Abijeet Patro; author: Pppery):

[mediawiki/extensions/Translate@mleb-2026.01] Block manual moves of message bundles too

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

Change #1240594 merged by jenkins-bot:

[mediawiki/extensions/Translate@mleb-2026.01] Block manual moves of message bundles too

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