Page MenuHomePhabricator

Moving a File: page without a file onto a deleted file is not possible in Commons
Open, Needs TriagePublic

Description

While attempting to handle some "lost" File: namespace page ediths from P8677 list (T173070) I encoutered a problem with merging history of pages in File: namespace: moving a "lost" File: page (with no file associated) onto a recently deleted file generates an error:

The page could not be moved, for the following reasons:

  The title is the same; cannot move a page over itself.
  A page of that name already exists, or the name you have chosen is not valid. Please choose another name.

(The target file was actually deleted at that time.)
The problem is not related to the files listed, as an attempt to move a fresh, recently created file page gives the same result.

Tested wih the following examples (all failed):

File:T173070Ryde Tesco pedestrian walkway.JPG -> File:Ryde Tesco pedestrian walkway.JPG
File:T173070Nové Dvory (Sedlec-Prčice), křižovatka u kapličky, zdola.jpg -> File:Nové Dvory (Sedlec-Prčice), křižovatka u kapličky, zdola.jpg
File:Nové Dvory (Sedlec-Prčice).jpg -> File:Nové Dvory (Sedlec-Prčice), křižovatka u kapličky, zdola.jpg
File:Nové Dvory (Sedlec-Prčice).jpg -> File:Aritaum 201604.jpg

Any hints how to merge wikitext revision of such pages are welcome.

Event Timeline

You can do this manually, by merging the wikitext by hand and then deleting the prefixed version.

You can do this manually, by merging the wikitext by hand and then deleting the prefixed version.

The intention of history merging is to keep the original contributor information, not only the content.

As suggested by @Urbanecm I also tried Special:MergePages with a strange result:

Source page:      File:T173070Ryde Tesco pedestrian walkway.JPG
Destination page: File:Ryde Tesco pedestrian walkway.JPG

No revisions can be merged.

You can only merge revisions from "older" page to "newer". "Newer" is based on first revision (I suppose). So, you need... merge some revisions from the "valid" page to the "orphaned" page and then do second merge to move all again to the valid title.

But be careful! Test it first outside production! And wait for another solutions first!

I have not testet it but if it is only possible to move a page if there is also a file involved then this might work.

If you want to move File:A.jpg ---> File:B.jpg

  1. Undelete File:B.jpg (if it is deleted and if not just skip to 2)
  2. Move File:B.jpg ---> File:A.jpg
  3. Delete File:A.jpg
  4. Undelete File:A.jpg
  5. Move File:A.jpg ---> File:B.jpg
  6. Delete File:B.jpg (if it is supposed to be deleted)

I have not testet it but if it is only possible to move a page if there is also a file involved then this might work.

If you want to move File:A.jpg ---> File:B.jpg

  1. Undelete File:B.jpg (if it is deleted and if not just skip to 2)
  2. Move File:B.jpg ---> File:A.jpg
  3. Delete File:A.jpg
  4. Undelete File:A.jpg
  5. Move File:A.jpg ---> File:B.jpg
  6. Delete File:B.jpg (if it is supposed to be deleted)

Well, as the initial problem was triggered by a software error, it may be simpler to ask developers to move the revision server-side.
I am just wondering if there is a good reason that moving such page is not allowed even by privileged users.

Note, I can find a dosen reasons when the undelete/move mentioned above is technically not possible or not allowed by policy or very inconvenient.

Umherirrender added a subscriber: Umherirrender.

Works for me locally:

  • Create page "File:TestUpload.jpg" with a real file over Special:Upload
  • Delete "File:TestUpload.jpg"
  • Create "File:TestNoUpload.jpg" with action=edit
  • Move "File:TestNoUpload.jpg" to "File:TestUpload.jpg" with success

Is this still an issue or a software/server outage which is already resolved?