Page MenuHomePhabricator

action=wbcreateclaim can give unrelated error about constraint violation on descriptions
Closed, ResolvedPublic

Description

Using action=wbcreateclaim with the api can give a api error about constraint violation for a description in a language.

code=save-failed,
info=* A length constraint is triggered for language code "*".

  • There is {{PLURAL:1|a constraint|constraints}} violation for {{PLURAL:1|description|descriptions}} "..." for {{PLURAL:1|language code|language codes}} "*".

message=wikibase-error-constraint-violation-description

That is a unrelated constraint when adding a new claim for a item and should not be trigged. Adding the claim works when using the GUI. Thanks.


Version: unspecified
Severity: normal
Whiteboard: u=dev c=backend p=0

Details

Reference
bz49642

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:54 AM
bzimport set Reference to bz49642.
bzimport added a subscriber: Unknown Object (MLST).

This also happens for action=wbsetlabel, here's an example: (should be reproducible unless someone manually fixes the constraint violation for Q51606)

Request:

{
'language': 'nb',
'value': 'Approksimanter',
'action': 'wbsetlabel',
'id': 'Q51606',
...
}

Response:

{
'error': {

'messages': {
 '0': {
  'type': 'error', 
  'name': 'wikibase-error-constraint-violation-description', 
  'parameters': [1, 'id', 'Aproksiman adalah bunyi fonet...']
 }, 
'html': {
 '*': '<ul><li> A length constraint is triggered for language code "id".\n</li><li> There is a constraint violation for description "Apro      ksiman adalah bunyi fonet..." for language code "id".\n</li></ul>\n'
 }
}

}
}

  • Bug 55341 has been marked as a duplicate of this bug. ***
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).

I checked the second example, that works perfectly fine now. Same for adding claims. I tried some things but wasn't able to reproduce the error. So I assume I can close this bug.

Lucie set Security to None.