Page MenuHomePhabricator

Credit label update deferred if only Web2Cit citation available (no Citoid citation)
Closed, ResolvedPublic

Description

We rely on the credit label being set (i.e., set to "Powered by Zotero", for example) to append "& Web2Cit" at the end, if applicable.

However, in some cases, the credit label may not be set. This would be the case when a Citoid citation would not be returned.

As a result, not only would "& Web2Cit" not be appended, but worse: it would be appended the next time the credit label is set, regardless of whether it should be appended or not this time.

Do:

  1. Set a "Powered by Web2Cit" label (if applicable) by default, for cases where no Citoid citation is returned. Try and see if ve.msg( 'citoid-citoiddialog-credit', 'Web2Cit' ) works (for internationalization).
  2. Make our buildTemplateResults patch always unset the credit's labelChange listener, before deciding whether it should be set for the specific case at hand.

Event Timeline

Possibly related, when the credit label is not shown because the main citation returned has source: ["citoid"] (see T328442), next time a citation is inserted using the user script the credit label reads: [object Object] & Web2Cit:

Screenshot for Diego2SealifeBase.png (342×511 px, 36 KB)

Screenshot provided by @MargaretRDonald

Thanks for this, Diego
Margaret Donald BA (Hon), M. App Stat, Ph.D.
Statistician, Anne Clements & Associates

diegodlh claimed this task.

Should be fixed in 8cf5c95c. Deployed in 133886.

We apply the credit label differently and show separate credit labels for each reference.