Page MenuHomePhabricator

Exception: Can only construct MonolingualTextValue with a language code of non-zero length
Closed, ResolvedPublic

Description

such as when requesting http://test.wikidata.org/w/api.php/?action=wbparsevalue&format=json&parser=monolingualtext&values=foo&options=%7B%22valuelang%22%3A%22%22%7D

which happens when entering a value and not yet a language.

2014-08-15 13:08:14 mw1017 testwikidatawiki: [9f4b9093] /w/api.php?action=wbparsevalue&format=json&parser=monolingualtext&values=fd&options=%7B%22valuelang%22%3A%22%22%7D Exception from line 46 of /usr/local/apache/common-local/php-1.24wmf17/extensions/Wikidata/vendor/data-values/common/src/DataValues/MonolingualTextValue.php: Can only construct MonolingualTextValue with a language code of non-zero length
#0 /usr/local/apache/common-local/php-1.24wmf17/extensions/Wikidata/extensions/Wikibase/lib/includes/parsers/MonolingualTextParser.php(39): DataValues\MonolingualTextValue->__construct('', 'fd')
#1 /usr/local/apache/common-local/php-1.24wmf17/extensions/Wikidata/vendor/data-values/common/src/ValueParsers/StringValueParser.php(51): Wikibase\Parsers\MonolingualTextParser->stringParse('fd')
#2 /usr/local/apache/common-local/php-1.24wmf17/extensions/Wikidata/extensions/Wikibase/repo/includes/api/ParseValue.php(86): ValueParsers\StringValueParser->parse('fd')
#3 /usr/local/apache/common-local/php-1.24wmf17/extensions/Wikidata/extensions/Wikibase/repo/includes/api/ParseValue.php(56): Wikibase\Api\ParseValue->parseValue(Object(Wikibase\Parsers\MonolingualTextParser), 'fd')
#4 /usr/local/apache/common-local/php-1.24wmf17/includes/api/ApiMain.php(907): Wikibase\Api\ParseValue->execute()
#5 /usr/local/apache/common-local/php-1.24wmf17/includes/api/ApiMain.php(363): ApiMain->executeAction()
#6 /usr/local/apache/common-local/php-1.24wmf17/includes/api/ApiMain.php(334): ApiMain->executeActionWithErrorHandling()
#7 /usr/local/apache/common-local/php-1.24wmf17/api.php(85): ApiMain->execute()
#8 /usr/local/apache/common-local/w/api.php(3): require('/usr/local/apac...')
#9 {main}


Version: unspecified
Severity: normal

Details

Reference
bz69608

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:34 AM
bzimport set Reference to bz69608.
bzimport added a subscriber: Unknown Object (MLST).

Change 154277 had a related patch set uploaded by Aude:
Handle MonolingualTextParser errors for values with language not set

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

Change 154279 had a related patch set uploaded by Aude:
Handle MonolingualTextParser errors for values with language not set

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

Change 154277 merged by Jeroen De Dauw:
Handle MonolingualTextParser errors for values with language not set

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

Change 154279 merged by Aude:
Handle MonolingualTextParser errors for values with language not set

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

Change 154813 had a related patch set uploaded by Aude:
Update Wikidata, fix uncaught exception in MonolingualTextParser

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

Change 154813 merged by jenkins-bot:
Update Wikidata, fix uncaught exception in MonolingualTextParser

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