[bug report] Translator Icon appears for PDF from google books

This is with 3.0b2.r10670

I download the pdf from here:
http://books.google.com/books?id=-WxKAAAAYAAJ&pg=PP1#v=onepage&q&f=false

Saved it, then opened in Firefox using the acrobat plugin. This is where the weirdness happens:
I get a translator icon in the URL bar that says "Save to Zotero (BibTeX)" - I didn't even think that would be possible.
Of course I was curious and tried clicking - which resulted in a seemingly endless stream of empty items being downloaded into Zotero until it froze on an unresponsive script error - I stopped it and Zotero crashed (Zotero error - please restart FF). It also seems like it deleted the collection I was saving into - although that may have happened in my attempts to delete items as they were coming in. Not a problem for me, this is my test profile, but obviously unacceptable for regular usage.

I've never seen this before and I figure it must be quite rare, but if it can be reproduced it'd still be good to fix.
  • Can you reproduce this and provide debug output (probably using realtime output and redirecting it to a file: http://www.zotero.org/support/debug_output#real-time_debug_output)? That should let us know when the translator is being called, and on what input. Add a line like Z.debug(text) to the beginning of detectImport and doImport so we know what the input "text" is.
  • sorry, I'm blanking here - how do I redirect to a file?
    I tried running
    firefox > zoterodebug.txt
    but that didn't write anything to the file.
    (Also, the error disappears when I add Z.debug(text) to the BibTeX translator and reappears when I remove it)
  • Debug is probably error output-- try firefox 2> file
  • sent to ajlyon and zotero support
  • no. It still picks up the file as translatable - the behavior on attempting translator looks slightly different, but still crashes.
  • Hmm. Can you send me the PDF in question?
  • it's free - go to
    http://books.google.com/books?id=-WxKAAAAYAAJ&pg=PP1#v=onepage&q&f=false
    and use Download--> PDF
  • "Save to Zotero (BibTeX)" also appears for the PDF with Zotero 2.1.10, FWIW.
  • We can tighten detection if we require that each imported file includes at least one entry with a Zotero-recognized type: book, inbook, incollection, article, phdthesis, unpublished, inproceedings, conference, techreport, booklet, manual, mastersthesis, misc, proceedings

    The issue is that this PDF, and probably many PDFs and binary files in general, contains plenty of sequences like @k{, surrounded by other binary data. Zotero takes those to be BibTeX entries.

    If we can require that at least one @article{, @misc{, etc. is present, we can probably make detection fail 99.9% of the time on these binary inputs.
  • That sounds fine to me.
    I'm confused why Zotero is looking in the first place?
    If I go on a website with actual BibTeX data, like here:
    http://plato.stanford.edu/cgi-bin/encyclopedia/archinfo.cgi?entry=plato
    I don't get a translator. So why does it look in a pdf that's opened in FF, but not in a webpage? If anything I'd want/expect the opposite.
  • I was surprised to see that as well-- Zotero is running its import detection on it, not, as I would have expected, the web detection. My guess is that this is essentially so you can drop BibTeX files onto a running Firefox or Zotero instance and get an import automatically.
Sign In or Register to comment.