diegodlh / zotero-cita

Cita: a Wikidata addon for Zotero with citations metadata support
GNU General Public License v3.0
218 stars 10 forks source link

Install failed? #241

Closed chenboshuo closed 1 year ago

chenboshuo commented 1 year ago

Describe the bug When I install the add-on, the Zotero doesn't prompt me to restart and there is no error message in the console, and there is no citations plane, please tell me what to do next, thank you. To Reproduce Install add-ons

Expected behavior At least Zotero should prompt me to restart, and the citations plane should appear on the right.

Screenshots image

Environment:

Additional context Add any other context about the problem here. For example, a list of installed add-ons.

Futur3r commented 1 year ago

I've tried to reproduce the bug in a VM, I can confirm the bug in Zotero 6.0.22 and 6.0.23. With Cita both in beta and stable. The add-on works up to 6.0.20 apparently.

I've also reproduced the bug on another linux distro, so it looks like it's only a problem with the latest versions of Zotero.

Dominic-DallOsto commented 1 year ago

Still looking into this - but I got the following error messaging when trying to install in 6.0.22

1678831573895   addons.xpi  WARN    Exception running bootstrap method shutdown on zotero-wikicite@wikidata.org: TypeError: tmpWin.WikiciteChrome.removeXUL is not a function (resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Dominic/AppData/Roaming/Zotero/Zotero/Profiles/3vvlvf75.debug/extensions/zotero-wikicite@wikidata.org.xpi!/bootstrap.js:33:5) JS Stack trace: shutdown@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Dominic/AppData/Roaming/Zotero/Zotero/Profiles/3vvlvf75.debug/extensions/zotero-wikicite@bootstrap.js:33:5
callBootstrapMethod@XPIProvider.jsm:4446:20
startInstall/<@XPIInstall.jsm:1750:15
1678831574369   addons.xpi  WARN    Exception running bootstrap method startup on zotero-wikicite@wikidata.org: TypeError: Component is undefined (chrome://cita/content/main.js:43991:5) JS Stack trace: getDisplayName@main.js:43991:5
injectIntl@main.js:44008:44
./src/components/button.js@main.js:2349:15
__webpack_require__@main.js:53780:12
./src/components/itemPane/citationsBox.jsx@main.js:2370:65
__webpack_require__@main.js:53780:12
./src/containers/citationsBoxContainer.jsx@main.js:2994:95
__webpack_require__@main.js:53780:12
./src/zoteroOverlay.jsx@main.js:8025:91
__webpack_require__@main.js:53780:12
./src/index.js@main.js:3221:72
__webpack_require__@main.js:53780:12
@main.js:53830:11
@main.js:1:10
loadWindowChrome@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Dominic/AppData/Roaming/Zotero/Zotero/Profiles/3vvlvf75.debug/extensions/zotero-wikicite@bootstrap.js:138:5
prepareWindows@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Dominic/AppData/Roaming/Zotero/Zotero/Profiles/3vvlvf75.debug/extensions/zotero-wikicite@bootstrap.js:97:7
init@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Dominic/AppData/Roaming/Zotero/Zotero/Profiles/3vvlvf75.debug/extensions/zotero-wikicite@bootstrap.js:65:5
startup@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Dominic/AppData/Roaming/Zotero/Zotero/Profiles/3vvlvf75.debug/extensions/zotero-wikicite@bootstrap.js:20:3
callBootstrapMethod@XPIProvider.jsm:4446:20
startInstall/<@XPIInstall.jsm:1821:13
Futur3r commented 1 year ago

@Dominic-DallOsto , I'm not sure at all. In your post there is "injectIntl", which is called in src/button.js

import { Button as ZoteroButton } from 'zotero@components/button';
import { injectIntl } from 'react-intl';

export let Button = injectIntl(ZoteroButton.WrappedComponent);

And in the third commit (the PR) after they updated to 6.0.20, someone deleted a bunch of "const { injectIntl } = require('react-intl')" and "import { IntlProvider, FormattedMessage } from "react-intl";", in multiple files but also in "chrome/content/zotero/components/button.jsx".

This dependency is also imported in citationsBox.jsx.

Dominic-DallOsto commented 1 year ago

Thanks a lot @Futur3r - that was indeed the issue!

I tested and didn't see any issue with string localisation after removing react-intl (it was only running on the drop down menu button in the citations tab anyway).

chenboshuo commented 1 year ago
  1. I added citations to some articles, however, these items appeared in the "Related" field, not the "Citations" field.
  2. Showing the local citation network is not working. image image