windingwind / zotero-actions-tags

Customize your Zotero workflow.
GNU Affero General Public License v3.0
1.83k stars 48 forks source link

[Bug] #234

Closed thinkingaloudallowed closed 9 months ago

thinkingaloudallowed commented 9 months ago

Is there an existing issue for this?

Are you using the latest Zotero and the latest plugin?

Environment

Describe the bug

[Share] QuickCopy items #165

Hi - I'm running into a problem with this scribt:

when I try to use it with Zotero 7 I get the following error message

Script error: style getCiteProc is not a function

looking round Zotero and GitHub in relation to this I found that there was an issue about not leaving the 'item format' empty in the export settings for Quick copy. I made sure to select this, but after triggering the script I found that the item format was set to 'loading …' - in other words it is empty after using the script.

Any suggestions?

Debug Output

Submit… Clear 1704405485468 addons.xpi WARN Checking /Applications/Zotero.app/Contents/Resources/distribution/extensions for addons

[JavaScript Error: "NS_NOINTERFACE: " {file: "resource://gre/modules/ComponentUtils.jsm" line: 90}] createInstance@resource://gre/modules/ComponentUtils.jsm:90:36

1704405486266 addons.xpi WARN Addon with ID undefined already installed, older version will be disabled

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1710}]

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1710}]

[JavaScript Error: "uncaught exception: undefined"]

[JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITelemetry.getHistogramById]" {file: "resource://gre/modules/TerminatorTelemetry.jsm" line: 87}]

[JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITelemetry.getHistogramById]" {file: "resource://gre/modules/TerminatorTelemetry.jsm" line: 87}]

[JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITelemetry.getHistogramById]" {file: "resource://gre/modules/TerminatorTelemetry.jsm" line: 87}]

[JavaScript Error: "Upload request 1/36C2K5HQ failed"]

[JavaScript Error: "You have reached your Zotero File Storage quota. Some files were not uploaded. Other Zotero data will continue to sync to the server.

See your zotero.org account settings for additional storage options.

Reber - 2010 - What Is the Memory Capacity of the Human Brain.pdf (540 KB)"]

[JavaScript Error: "Upload request 1/3CK8H3LT failed"]

[JavaScript Error: "You have reached your Zotero File Storage quota. Some files were not uploaded. Other Zotero data will continue to sync to the server.

See your zotero.org account settings for additional storage options.

Zevin - 2014 - The Storied Life of A.J. Fikry by the Sunday Time.pdf (34179 KB)"]

[JavaScript Error: "NotFoundError: Could not get children of file(/Users/thinkingaloudallowed/Library/Application Support/Zotero/Crash Reports/events) because it does not exist" {file: "resource://gre/modules/CrashManager.jsm" line: 682}] _getUnprocessedEventsFiles/<@resource://gre/modules/CrashManager.jsm:682:12

[JavaScript Error: "Error connecting to server. Check your Internet connection."]

[JavaScript Error: "Error connecting to server. Check your Internet connection."]

[JavaScript Error: "Error connecting to server. Check your Internet connection."]

appName => Zotero, version => 7.0.0-beta.54+6b996d4f9, os => macOS 14.3, locale => en-GB, extensions => Actions and Tags for Zotero (1.0.0-beta.32, extension), Wandering File (0.2.8, extension, disabled), Better Notes for Zotero (1.1.4-25, extension, disabled), Del Item With Attachment (0.2.5, extension, disabled), Notero (0.5.7, extension, disabled), Better BibTex for Zotero (6.7.143, extension, disabled) (3)(+0051326): Running /usr/bin/sw_vers '-productVersion'

(3)(+0012913): Getting contents of /Users/thinkingaloudallowed/Library/Application Support/Zotero/Profiles/r3elh0sr.default/treePrefs.json

(3)(+0000002): Writing column prefs of length 2298 to file /Users/thinkingaloudallowed/Library/Application Support/Zotero/Profiles/r3elh0sr.default/treePrefs.json

(1)(+0002427): HTTP POST https://api.zotero.org/users/8625965/fulltext failed with status code 0

(2)(+0000002): Channel status was 2152398919

(2)(+0000003): Channel status was 2152398919

(3)(+0000002): [ConcurrentCaller] Error in function (0/4, 0 in queue)

(1)(+0000001): Error: Error connecting to server. Check your Internet connection. Error: Error connecting to server. Check your Internet connection. Zotero.HTTP</this.UnexpectedStatusException@chrome://zotero/content/xpcom/http.js:21:18 _checkConnection@chrome://zotero/content/xpcom/http.js:1246:11 Zotero.HTTP</this.request@chrome://zotero/content/xpcom/http.js:161:27 From previous event: ZoteroStandalone</this.onLoad@chrome://zotero/content/standalone/standalone.js:95:5 @chrome://zotero/content/standalone/standalone.js:1023:64

(3)(+0000001): Full-text sync failed for library 1

(1)(+0000000): Error: Error connecting to server. Check your Internet connection. Error: Error connecting to server. Check your Internet connection. Zotero.HTTP</this.UnexpectedStatusException@chrome://zotero/content/xpcom/http.js:21:18 _checkConnection@chrome://zotero/content/xpcom/http.js:1246:11 Zotero.HTTP</this.request@chrome://zotero/content/xpcom/http.js:161:27 From previous event: ZoteroStandalone</this.onLoad@chrome://zotero/content/standalone/standalone.js:95:5 @chrome://zotero/content/standalone/standalone.js:1023:64

(1)(+0000001): Error: Error connecting to server. Check your Internet connection. Error: Error connecting to server. Check your Internet connection. Zotero.HTTP</this.UnexpectedStatusException@chrome://zotero/content/xpcom/http.js:21:18 _checkConnection@chrome://zotero/content/xpcom/http.js:1246:11 Zotero.HTTP</this.request@chrome://zotero/content/xpcom/http.js:161:27 From previous event: ZoteroStandalone</this.onLoad@chrome://zotero/content/standalone/standalone.js:95:5 @chrome://zotero/content/standalone/standalone.js:1023:64

(3)(+0000000): Starting full-text sync for IFP text analysis

(4)(+0000001): SELECT version FROM version WHERE schema=? ['fulltext_2']

(3)(+0000000): [ConcurrentCaller] All tasks are done

(3)(+0000001): Library version hasn't changed -- skipping full-text download

(3)(+0000000): Uploading full-text content for IFP text analysis

(4)(+0000001): SELECT itemID, indexedChars, totalChars, indexedPages, totalPages FROM fulltextItems FI JOIN items I USING (itemID) WHERE libraryID=? AND FI.synced=? AND I.synced=1 ORDER BY itemID [2, 0]

(3)(+0000000): Starting full-text sync for Online pedagogy

(4)(+0000000): SELECT version FROM version WHERE schema=? ['fulltext_3']

(3)(+0000001): Library version hasn't changed -- skipping full-text download

(3)(+0000000): Uploading full-text content for Online pedagogy

(4)(+0000000): SELECT itemID, indexedChars, totalChars, indexedPages, totalPages FROM fulltextItems FI JOIN items I USING (itemID) WHERE libraryID=? AND FI.synced=? AND I.synced=1 ORDER BY itemID [3, 0]

(3)(+0000000): Done with full-text syncing

(3)(+0000001): Done syncing

(3)(+0000000): Notifier.trigger('finish', 'sync', []) called [observers: 3]

(4)(+0000000): SELECT libraryID AS id FROM feeds WHERE refreshInterval IS NOT NULL AND ( lastCheck IS NULL OR (julianday(lastCheck, 'utc') + (refreshInterval/1440.0) - julianday('now', 'utc')) <= 0 )

(3)(+0000001): Running update for feeds:

(3)(+0000000): All feed updates done

(3)(+0000000): Scheduling next feed update

(4)(+0000000): SELECT ( CASE WHEN lastCheck IS NULL THEN 0 ELSE strftime('%s', lastCheck) + refreshInterval * 60 - strftime('%s', 'now') END ) AS nextCheck FROM feeds WHERE refreshInterval IS NOT NULL ORDER BY nextCheck ASC LIMIT 1

(3)(+0000000): No feeds with auto-update

(3)(+0039949): Running /usr/bin/sw_vers '-productVersion'

(3)(+0010916): itemTree.render(). Displaying Item Tree

(3)(+0000007): Viewing item in pane 0

(4)(+0000003): Registering notifier observer 'itemBox_km' for [item]

(3)(+0000001): Refreshing item box

(4)(+0000165): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [1169, 'https://www.aft.org/periodical/american-educator/spring-2004/ask-cognitive-scientist-practice-makes-perfect-only-if-you']

(4)(+0000001): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [980, '']

(3)(+0000484): Zotero.Items.keepParents() is deprecated -- use Zotero.Items.keepTopLevel() instead

(4)(+0000003): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [1169, 'https://www.aft.org/periodical/american-educator/spring-2004/ask-cognitive-scientist-practice-makes-perfect-only-if-you']

(4)(+0000019): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [1169, 'https://www.aft.org/periodical/american-educator/spring-2004/ask-cognitive-scientist-practice-makes-perfect-only-if-you']

(4)(+0000002): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [1169, 'https://www.aft.org/periodical/american-educator/spring-2004/ask-cognitive-scientist-practice-makes-perfect-only-if-you']

(4)(+0000001): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [1169, 'https://www.aft.org/periodical/american-educator/spring-2004/ask-cognitive-scientist-practice-makes-perfect-only-if-you']

(4)(+0000001): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [1169, 'https://www.aft.org/periodical/american-educator/spring-2004/ask-cognitive-scientist-practice-makes-perfect-only-if-you']

(3)(+0003688): [Actions and Tags for Zotero] Script Error {}

(4)(+0000001): Beginning DB transaction SqkOvSx7

(4)(+0000002): Committed DB transaction SqkOvSx7

(3)(+0000001): [Actions and Tags for Zotero] applyAction {"event":0,"operation":4,"data":"/\n QuickCopy items\n @author Zotero Community\n @usage Copy selected items to the clipboard\n @link https://github.com/windingwind/zotero-actions-tags/discussions/165\n @see https://github.com/windingwind/zotero-actions-tags/discussions/165\n /\nif (items?.length === 0 || item) {\n\treturn;\n}\n\nconst Zotero = require(\"Zotero\");\nconst ZoteroPane = require(\"ZoteroPane\");\n\nconst pref = 'export.quickCopy.setting';\nconst origSetting = Zotero.Prefs.get(pref);\n\n/\n Replace this line with your own setting\n Steps:\n 1. Change Settings -> Export -> Quick Copy -> Item Format\n 2. Open Settings -> Advanced -> Config Editor\n 3. Search for export.quickCopy.setting.\n 4. Paste the value and replace the string bibliography/html=http://www.zotero.org/styles/acm-siggraph below.\n 5. Reset Settings -> Export -> Quick Copy -> Item Format (If necessary)\n /\nconst newSetting = \"bibliography/html=http://www.zotero.org/styles/acm-siggraph\";\n\nZotero.Prefs.set(pref, newSetting);\nZoteroPane.copySelectedItemsToClipboard(false);\nZotero.Prefs.set(pref, origSetting);\nreturn QuickCopy done;","shortcut":"⌥,enter","enabled":true,"menu":"copy cite key","name":"cite key","showInMenu":{"item":true,"collection":true,"tools":true,"reader":true,"readerAnnotation":true}} {"itemIDs":[1169]}

(4)(+0000006): Beginning DB transaction vf7kJnvP

(4)(+0000001): Item 1169 has not changed

(4)(+0000001): Committed DB transaction vf7kJnvP

(3)(+0000000): [Actions and Tags for Zotero] applyAction {"event":0,"operation":4,"data":"/\n QuickCopy items\n @author Zotero Community\n @usage Copy selected items to the clipboard\n @link https://github.com/windingwind/zotero-actions-tags/discussions/165\n @see https://github.com/windingwind/zotero-actions-tags/discussions/165\n /\nif (items?.length === 0 || item) {\n\treturn;\n}\n\nconst Zotero = require(\"Zotero\");\nconst ZoteroPane = require(\"ZoteroPane\");\n\nconst pref = 'export.quickCopy.setting';\nconst origSetting = Zotero.Prefs.get(pref);\n\n/\n Replace this line with your own setting\n Steps:\n 1. Change Settings -> Export -> Quick Copy -> Item Format\n 2. Open Settings -> Advanced -> Config Editor\n 3. Search for export.quickCopy.setting.\n 4. Paste the value and replace the string bibliography/html=http://www.zotero.org/styles/acm-siggraph below.\n 5. Reset Settings -> Export -> Quick Copy -> Item Format (If necessary)\n /\nconst newSetting = \"bibliography/html=http://www.zotero.org/styles/acm-siggraph\";\n\nZotero.Prefs.set(pref, newSetting);\nZoteroPane.copySelectedItemsToClipboard(false);\nZotero.Prefs.set(pref, origSetting);\nreturn QuickCopy done;","shortcut":"⌥,enter","enabled":true,"menu":"copy cite key","name":"cite key","showInMenu":{"item":true,"collection":true,"tools":true,"reader":true,"readerAnnotation":true}} {"itemID":1169}

Anything else?

Here's a link to a Zotero post discussing this issue - https://forums.zotero.org/discussion/comment/394669/#Comment_394669

Here's the issue being discussed in the Notero repository https://github.com/dvanoni/notero/issues/12

windingwind commented 9 months ago

See that dicussion