Page MenuHomePhabricator

Modify character limit for "string" and "monolingual text" on wikibase instances (not Wikidata).
Closed, ResolvedPublic2 Estimated Story Points

Description

On Wikidata there are limits to the maximum allowed number of characters for "string" and "monolingual text" data types. On wikibase instances (different from Wikidata) it would be useful to be able to change and/or eliminate such limits, to adapt to the relevant needs.


Currently it is not possible to create monolingual string datavalues longer than 400 chars.

This is currently not configurable. It seems to be set by ValidatorBuilders.php#298 which just uses the default length which is hardcoded to 400 (ValidatorBuilders.php#181)

Acceptance Criteria
Configuration option to define arbitrary length monolingual string values for snaks
Given that the user tries to make a string value shorter than (or equal to) the defined max length the edit is successful
Given that the user tries to make a longer value than the defined max length the edit fails with a validation error.

Event Timeline

Restricted Application added a subscriber: Aklapper. Β· View Herald TranscriptJun 25 2018, 2:03 PM
β€’ Vvjjkkii renamed this task from Modify character limit for "string" and "monolingual text" on wikibase instances (not Wikidata). to bcaaaaaaaa.Jul 1 2018, 1:02 AM
β€’ Vvjjkkii triaged this task as High priority.
β€’ Vvjjkkii updated the task description. (Show Details)
β€’ Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from bcaaaaaaaa to Modify character limit for "string" and "monolingual text" on wikibase instances (not Wikidata)..Jul 2 2018, 10:06 AM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
Restricted Application added a project: User-Addshore. Β· View Herald TranscriptJul 19 2018, 9:42 AM
Tarrow reopened this task as Open.Sep 10 2018, 1:06 PM
Tarrow added a subscriber: Tarrow.

It appears to me this settings works for labels descriptions and aliases but doesn't work for Monolingual Strings Values.

See: extensions/Wikibase/repo/includes/ValidatorBuilders.php#298

Looks like it is not configurable to me

As additional information to the comment of Tarrow,
in the configuration documentations https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/9fd56eeff568c752066d0f6f7bc2971282580360/docs/options.wiki
it is written that the customization on multilang-limits affects multilanguage strings

Thus, as the type "Monolingual text" would not be a Multilanguage string, one could think the customisation might not work for it.

However, I have tried the customisation also with properties having type "String" (which seems to me to be a Multilanguage string), and the customization does not work anyway.

Essentially it seems that the configuration customization affects strictly only labels and descriptions, and not properties, no matter what "stringy" type a property has (be it String or Monolingual text).

Change 471492 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Wikibase@master] Allow configuration of monolingual text lengths

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

Addshore triaged this task as Medium priority.Nov 3 2018, 2:10 PM
Addshore moved this task from incoming to in progress on the Wikidata board.
Addshore moved this task from To Do to Review on the Wikibase-UserGroup board.
Addshore set the point value for this task to 2.

Change 471705 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/WikibaseMediaInfo@master] Use string-limits option instead of multilang-limits

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

Change 471706 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Wikibase@master] Remove deprecated multilang-limits option

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

Change 471492 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Allow configuration of monolingual text lengths

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

Change 471705 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Use string-limits option instead of multilang-limits

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

Change 471706 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Remove deprecated multilang-limits option

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