The CommonsHelper's config files tell us which categories and templates should prohibit a file move. We want to find out if one of the forbidden categories and templates exist in the most current version of the file page, to be able to disallow the move.
- If the most current version of the file move candidate contains one of the categories or templates as defined in T194129, disallow the file move.
- The user should be redirected to the error page. The message should be as defined in T189570 under "wrong licence":
The file cannot be imported, because it is marked as <template name/ category name>. <The target wiki name> does not allow such files.
- If there is no forbidden template or category, continue with the file move without any further comment.
- This happens before we enter the file preview page.
- Investigation and proof of concept was done in T193622. We should get the lists of templates and categories from the API of the source wiki. The above ticket contains a proof of concept patch