Page MenuHomePhabricator

Template replacements are made 1 revision too early
Closed, ResolvedPublic3 Story Points

Description

This edit https://commons.wikimedia.org/wiki/Special:Diff/309221779 holds the summary line "Imported with FileImporter from …". Technically, this is supposed to be a null edit with no changes, only with this summary line. But it contains two changes: The HTML comment <!--This file was moved here using FileImporter from …--> is added to the top, and the template replacements are made.

The next edit https://commons.wikimedia.org/wiki/Special:Diff/309221781 holds the summary line "Replaced 1 template names with Wikimedia Commons template names".

Reported at T194505#4391840.

Another worst-case example: In http://mwfileimport.wmflabs.org/wiki/index.php?title=File:Stolperstein_f%C3%BCr_Lina_Speiser,_Br%C3%BCckenstrasse_11,_Bad_Cannstatt,_Stuttgart.JPG&curid=105&action=history the summary line "Replaced … template names with … template names" got lost entirely, because the edit was empty (the user did not made additional edits).

TODO:

  • The template replacements must be made in the next revision.
  • The summary line should not get lost.
  • The HTML comment should also be added in the next revision.
  • The null revision should only contain the title change (if one was made).

Related Objects

Event Timeline

thiemowmde updated the task description. (Show Details)Jul 3 2018, 12:50 PM
Lea_WMDE renamed this task from Template replacements are made 1 revision to early to Template replacements are made 1 revision too early.Jul 3 2018, 12:52 PM
Lea_WMDE triaged this task as Normal priority.
Lea_WMDE set the point value for this task to 3.
thiemowmde updated the task description. (Show Details)Jul 3 2018, 12:55 PM

Change 443934 had a related patch set uploaded (by Andrew-WMDE; owner: Andrew-WMDE):
[mediawiki/extensions/FileImporter@master] Bring back initial null revision and move all changes to the next revision

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

Change 444179 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] [WIP] Update ImporterComponentTest to use NullRevisionCreator

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

Change 443934 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Bring back initial null revision and move all changes to the next revision

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

WMDE-Fisch updated the task description. (Show Details)Jul 11 2018, 10:42 AM
Lea_WMDE closed this task as Resolved.Jul 18 2018, 3:51 PM