Opened 5 years ago

Closed 4 years ago

#1829 closed defect (fixed)

[PATCH] wpdDOMSaver fails due to undefined Zotero

Reported by: ajlyon Owned by: simon
Priority: major Milestone:
Component: ingester Version: future
Keywords: Cc: dstillman

Description

Error in console when saving snapshot, apparently due to call to Zotero.isFx4 (introduced in r7371). The snapshot doesn't actually occur-- Zotero can't subsequently open it. Tested with NYTimes.

[wpdDOMSaver.init] ...
[wpdDOMSaver.saveDocumentHTML]: /home/ajlyon/.mozilla/firefox/rhpl693w.Zotero Trunk/zotero/storage/VT63S3H8/16pogue.html
ERROR: [wpdDOMSaver.saveHTMLDocument]
 -> ReferenceError: Zotero is not defined

The attached patch vs. r9500 defines Zotero, so it goes through. This clearly isn't affecting everyone, since r7371 was long ago... But I can replicate this with a trunk build of Zotero and a clean Firefox profile.

Attachments (1)

domsaver-message.diff (724 bytes) - added by ajlyon 5 years ago.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by ajlyon

comment:1 Changed 5 years ago by simon

Avram, can you reproduce this on the branch? I think it may be restricted to the trunk. I played around a lot with initialization routines in the megacommit, which might explain this.

comment:2 Changed 5 years ago by simon

In [9530]:

Addresses #1829: [PATCH] wpdDOMSaver fails due to undefined Zotero

Removes calls to Zotero object, since they are unnecessary (the call that was problematic was a workaround for a Fx 4 beta crashing bug).

comment:3 Changed 5 years ago by simon

  • Cc dstillman added

Dan, is there a reason we load WPD here instead of in zotero-service.js? mozIJSSubScriptLoader.loadSubScript() puts it in global scope anyway, and "global scope" is now the scope of zotero-service.js and not the scope of the rest of the xpcom directory. We should probably either move the load to zotero-service.js or use the second argument to loadSubScript() to load WPD with a restricted scope.

comment:4 Changed 4 years ago by simon

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.