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

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

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 subscribed.

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.

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.

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.

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

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