Page MenuHomePhabricator

Error on CiteTool gadget when it calls PropertyValueSnak
Open, Needs TriagePublic

Description

Spotted on wikidata-tech from max.kristen@wikipedia.de.

"It doesn't seem to work since the last few weeks, maybe because it calls
on PropertyValueSnak, which seems to have moved since the last JS API
version."

Info links:
https://www.wikidata.org/wiki/Wikidata:Tools/Enhance_user_interface#CiteTool
https://www.wikidata.org/wiki/User:MichaelSchoenitzer/CiteTool.js
https://doc.wikimedia.org/Wikibase/master/js/#!/api/PropertyValueSnak

Event Timeline

@Lydia_Pintscher there is a suspicion that this maybe a consequence of the RL Module improvement. It is however one of the gadgets that was not checked, because it is used by less than 400 users. Please check whether we want to prioritise this at this point.

@Lea_Lacroix_WMDE about the piece of communication we talked about, regarding guidelines and successes of the RL Module Terminators: for the sake of clarification it might be needed to mention the gadgets that were checked and why those.

Thanks for creating the ticket 👍

What are the possible options here? Should the gadget author update something in the code?

Thanks for creating the ticket 👍

What are the possible options here? Should the gadget author update something in the code?

Firstly we would need to gather more information about the error to assess that. Let me ping @Jakob_WMDE , @Ladsgroup and @Rosalie_WMDE for that, since they are the RL Module Terminator Team. They will surely have a more educated answer.

I will also ping @Lucas_Werkmeister_WMDE , since he replied to the email on the mailing list.

@Mvolz, I miss your version of CiteTool.

Adapting what Lucas wrote on the mailing list for User:MichaelSchoenitzer/CiteTool.js, replacing

mw.loader.using(['wikibase'], function() {

when loading it in your common.js with

mw.loader.using(['wikibase', 'wikibase.datamodel']).then(function (require) {
	var datamodel = require( 'wikibase.datamodel' );
	wb.datamodel = datamodel;

seems to make it work again by putting the variable back where it was before. I don't know why it was moved so I don't know if it will have some unexpected side effects.

It doesn't work for User:Mvolz_(WMF)/CiteTool.js though, that's producing some other errors that need fixing as well.

I tried the fix Nikki suggested above and it worked for me! Nice to have this tool back.