Page MenuHomePhabricator

DuplicateReferences: insertReference triggers TypeError
Closed, ResolvedPublic

Description

Inserting references using the DuplicateReferences isn't possible at the moment, the JavaScript console gives the following error:

TypeError: undefined is not an object (evaluating 'statementview.options.claimsChanger.setStatement')

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptAug 5 2016, 1:38 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Sjoerddebruin triaged this task as High priority.Aug 5 2016, 1:38 PM

The gadget is working again, see here. It is only a temporary solution though. What is needed to fix this properly?

Sjoerddebruin moved this task from Backlog to Bugs on the Wikidata-Gadgets board.Aug 17 2016, 7:47 PM

Deployment has just taken place, gadget is broken again:

TypeError: undefined is not an object (evaluating 'statementview._controller._model')

Right solution for this would be to have a top-level WikibaseRepo factory WikibaseRepo with a method getEntityChangersFactory. The EntityChangersFactory could then be used to get a StatementsChanger.

Right solution for this would be to have a top-level WikibaseRepo factory WikibaseRepo with a method getEntityChangersFactory. The EntityChangersFactory could then be used to get a StatementsChanger.

Would you be able to do that or do you know someone who can?

Jklamo added a subscriber: Jklamo.Sep 18 2016, 8:07 PM
Jonas moved this task from Done to Review on the Wikidata-Sprint-2016-09-21 board.
Jonas closed this task as Resolved.Sep 21 2016, 9:33 AM
Jonas claimed this task.

I quick fixed the gadget, but I agree with @adrianheine that we should extract a lot of code from entityViewInit to a factory, making the reuse of code in gadgets possible.

Jonas reopened this task as Open.Sep 21 2016, 11:47 AM

There seems to be more broken than just the saving

Well, worked fine for me :) but if there are more things to fix, maybe a new ticket...

Well, the basic function is working. No need to reopen this task imo. Could create separate tasks for the things that still need to be done.

Sjoerddebruin closed this task as Resolved.Sep 21 2016, 3:30 PM

Will make separate tasks for the (introduced) issues.