zotero / zotero-connectors

Chrome, Firefox, Edge, and Safari extensions for Zotero
https://www.zotero.org/download/connectors
Other
513 stars 121 forks source link

Date utilities cause translation to fail - `Zotero.Date` not initialized #505

Closed AbeJellinek closed 1 month ago

AbeJellinek commented 1 month ago

https://forums.zotero.org/discussion/comment/470869/#Comment_470869

[JavaScript Error: "Error: Zotero.Date: Zotero.Date.init() not called with resource/dateFormats.json
    at Object.getMonths (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/utilities/date.js:113:9)
    at Zotero.Utilities.Translate.strToDate (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/utilities/date.js:410:32)
    at Zotero.Utilities.Translate.strToISO (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/utilities/date.js:601:19)
    at Function.strToISO (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/translate/translation/sandboxManager.js:101:17)
    at publicationDate (Open%20WorldCat:61:51)
    at scrapeRecord (Open%20WorldCat:215:5)
    at scrape (Open%20WorldCat:193:2)
    at doWeb (Open%20WorldCat:178:9)
    at Zotero.Translate.Web.rest (chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/translate/translation/translate.js:1379:49)
    at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/translate/translation/translate.js:1363:39" {file: "[object Object]"}]

I can't reproduce this. Very weird, though. Log contains some other errors (TypeError: tabInfo.injections[frameId].reject is not a function) that might be unrelated.

AbeJellinek commented 1 month ago

https://forums.zotero.org/discussion/comment/470885/#Comment_470885

Same Zotero.Date error

AbeJellinek commented 1 month ago

And I'm able to reproduce on latest master now.