Page MenuHomePhabricator

Prevent users from entering short file caption on Commons
Closed, ResolvedPublic

Description

On Commons, anonymous users are entering unhelpful short caption for various files (See changes), and i used to revert them (See changes). Is it possible to prevent them entering short caption? Preventing them will save my time and project as well, and i can utilize that time on doing other stuffs.

Kind regards,
Tulsi Bhagat

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 6 2019, 1:30 PM

"File captions are a feature part of Structured data" 🡒 SDC General

Restricted Application added a project: Wikidata. · View Herald TranscriptOct 7 2019, 7:59 AM
Ramsey-WMF triaged this task as Medium priority.
Ramsey-WMF moved this task from To Do to Doing on the Structured Data Engineering board.
Ramsey-WMF added a subscriber: Ramsey-WMF.

We'll add a check to the captions field that ensures it's at least 5 characters long (the same rule as Descriptions has)

Fyi, @Charlotte , the SD team is looking at adding this restriction to captions, in case that affects your image caption suggested edit.

Thanks @Abit - good shout.

@Dbrant - remind me, do we also do a min character count on short captions? We will need to implement one, otherwise we're not going to be able to save the captions, and the users aren't going to know why.

Majora added a comment.EditedOct 7 2019, 8:15 PM

https://commons.wikimedia.org/wiki/Special:AbuseFilter/216 appears to be doing the work of this requested change already. It is only catching anon edits though and is set to tag and log anything less than 9 characters.

Dbrant added a comment.Oct 7 2019, 8:35 PM

We will need to implement one, otherwise we're not going to be able to save the captions, and the users aren't going to know why.

The server will return a well-formed error message, such as "The caption is too short, try again", just like it currently does for captions that are too long, so the user will know why the edit was rejected. Will that not be sufficient?

It's a better user experience not allowing the user to submit a too-short caption to begin with, rather than allowing them to submit it and getting an error back. But it's a low-priority UX debt task to fix, as long as the error message is sufficiently self-explanatory.

revi removed a subscriber: revi.Oct 8 2019, 12:50 AM

Change 542113 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/UploadWizard@master] Require captions - if present - to have at least 5 characters

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

Change 542119 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Require captions to have at least 5 characters

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

Change 542119 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Require captions to have at least 5 characters

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

Change 542113 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@master] Require captions - if present - to have at least 5 characters

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

Ramsey-WMF closed this task as Resolved.Dec 14 2019, 1:45 AM

This works on production (the text field warns the user about a minimum character requirement on File Page and UploadWizard)