Page MenuHomePhabricator

Remove {{Copy to Commons}} on the source wiki if export is successful
Open, Needs TriagePublicFeature

Description

  1. Get some file eligible for transfer to Commons (say from English Wikipedia)
  2. Export it
    • a. View the preview on Commons
    • b. Notice the tool detected {{Copy to Commons}} template and removed it, since it's not needed there
    • c. Mark the checkbox [ Mark source wiki file as imported to Wikimedia Commons ]
  3. Back to English Wikipedia.
  4. Notice the tool adds {{Now Commons}} templates on your behalf
  5. Notice the tool does not remove the {{Copy to Commons}} template which is also no longer needed
  6. Notice you have to manually remove it or leave it as some somebody else's problem. Both are not great

Once a file has been successfully moved to Commons, the {{Copy to Commons}} template is no longer valid. And attempt to move the file again will lead to error. So since the tool can already detect and remove it on Commons, it'll be good to also remove it from the source Wiki.

Event Timeline

Ammarpad created this task.Apr 24 2020, 9:56 AM
Restricted Application added a project: archived--TCB-Team. · View Herald TranscriptApr 24 2020, 9:56 AM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald Transcript
Ammarpad updated the task description. (Show Details)May 20 2020, 5:05 AM

It appears it has already been configured to do so https://www.mediawiki.org/wiki/Extension:FileImporter/Data/en.wikipedia#Remove, but it's not. So this is likely a bug.

JJMC89 changed the subtype of this task from "Task" to "Feature Request".May 20 2020, 5:24 AM
JJMC89 added a subscriber: JJMC89.

It appears it has already been configured to do so https://www.mediawiki.org/wiki/Extension:FileImporter/Data/en.wikipedia#Remove, but it's not. So this is likely a bug.

Those are the templates that get removed on Commons, not the source wiki.

Those are the templates that get removed on Commons, not the source wiki.

I am sure that's not correct. They're meant to be removed from the source wiki not Commons.

Those are the templates that get removed on Commons, not the source wiki.

I am sure that's not correct. They're meant to be removed from the source wiki not Commons.

The Remove section lists templates that should automatically be removed from the wikitext during transfer. So the FileImporter strips them from the code in the first step of the import form so that they will not be saved with the copy on Commons. - They will not be deleted on the original in the source wiki. That would also not make sense for every template listed in that section.

Currently there's no feature implemented that supports further automatic clean-up on the source wiki.

And instead of the Extension:FileImporter/Data configuration it could use Wikidata (Q5619864) to find the template to remove (it should also check redirects!), just like how the NowCommons addition works.

Logan added a subscriber: Logan.Jun 9 2020, 1:58 AM