Page MenuHomePhabricator

JS errors on SomeValueSnak/NoValueSnak
Closed, ResolvedPublic

Description

Some code seems to assume all Snaks have the getValue() and getType() methods, but SomeValueSnak and NoValueSnak don't. This triggeres JS errors, causing the page to be only partially initialized:

When loading Q38 on wikidata.org with FF 26.0 (logged in), I get:
TypeError: snak.getValue is not a function

In chromium, I get:
TypeError: Object #<WbPropertyNoValueSnak> has no method 'getValue'


Version: unspecified
Severity: critical
Whiteboard: UI

Details

Reference
bz60670

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 2:59 AM
bzimport set Reference to bz60670.

When fixing this, please add a regression test. We should be testing all data types with SomeValue/NoValue snaks.

(In reply to comment #2)

Hoo was working on that I think.

This is fixed, but not sure why it's not deployed, will investigate.

I found another instance of this issue, see https://gerrit.wikimedia.org/r/110527/. Still need the tests, though.

Tests are a different thing, this stills waits for a deploy