Page MenuHomePhabricator

Option to not insert a summary header when uploading files using Special:Upload
Open, LowestPublicFeature

Description

Feature summary: Have an option in the user preferences to not insert a summary header and/or detect if the submitted wikitext already starts with a level 2 header and skip the insertion of the summary header if it does.

Steps to reproduce (a list of clear steps to create the situation that made you report this, including full links if applicable):

  • Copy the wikitext of an existing file page
  • Go to Special:Upload
  • Paste wikitext, upload some file
  • Wild double header appears

Use case(s): I often create file pages by copy pasting them from existing files, for example the file page https://en.wikipedia.org/wiki/File:Bulgarian_Development_Bank_logo.png was copied from https://en.wikipedia.org/wiki/File:Bulgarian_Development_Bank_logo_(fair_use).gif with only the source changed, because I'm lazy. The bank has a new logo which I uploaded and the logo couldn't be converted to .gif very well, so overwriting was not an option.

Event Timeline

Aklapper triaged this task as Lowest priority.Aug 20 2021, 1:22 PM
Aklapper edited projects, added MediaWiki-Uploading; removed MediaWiki-File-management.

I don't think this use case is so common that it justifies adding yet another user preference.

I don't think this use case is so common that it justifies adding yet another user preference.

Here's 2000+ files from Commons and some more on enwiki. There's some variety in there, but it's generally this issue.

For myself I solved it with https://en.wikipedia.org/wiki/User:Alexis_Jazz/Remove_summary_header_in_special_upload.js which seems to work. This doesn't change the insertion of a summary header by MediaWiki, but it prevents me from inserting any.

If a user preference is out of the question, how about not inserting any summary header if the wikitext is found to start with a level 2 header? Or as yet another alternative, preload the textbox on Special:Upload with the summary header so it can be removed/replaced when desired?

T216542 is very similar to this, though I don't think it's a dupe.