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 subscriber: Aklapper. · View Herald Transcript

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

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?

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.

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.

Will make separate tasks for the (introduced) issues.