Zotero Standalone error

Report ID: 1459040622
I am getting an error while using my unpublished translator on our website.
I am using Google Chrome and Zotero Standalone with Zotero Connector (ver. 3.0.8.1).

Thank You.
  • we can't troubleshoot unpublished translators.
  • edited February 22, 2013
    Translator was created only for users of our website. The error is not in the translator because it works fine with Firefox. The error indicated some problem in Zotero.js. Let me know if you want me to email the translator to you and also you will need to have login access to our website for which we use the translator in order to test it.

    Thank you.
  • are other websites working from the Chrome Connector?
    In that case, this is a translator issue - there are various reasons a translator may not work in Chrome so the fact that it works in FF doesn't exclude that possibility, nor would an error necessarily (or even likely) be in the translator itself or in translate.js).
    If you post the translator to a public gist at gist.github.com and provide the link here, I can take a look if there's something obvious.
  • [JavaScript Error: "[Exception... "Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]" nsresult: "0x804b000a (NS_ERROR_MALFORMED_URI)" location: "JS frame :: chrome://zotero/content/xpcom/server_connector.js :: :: line 113" data: no]" {file: "chrome://zotero/content/xpcom/server_connector.js" line: 113}]"
  • That is different from the error I see through Chrome Developer tools.
    This is the error message I get:
    TypeError: Cannot read property 'length' of undefined at chrome-extension://ekhagklcjbdpajgpjgmbionohlpdbjgc/zotero/translation/translate.js:1622 zotero.js:143
  • see my message above - if other translators are working through the Chrome connector, the problem is with your translator (that's true for both of those errors). I'd need to see it to say more.
  • Found the problem (I think). The error message was misleading. The problem was that the browser support setting was off.


    Thanks for all your help.
  • that would have been one of the things to check for: If the translator is not marked as compatible with Chrome, Zotero tries to do the entire translation in Standalone, so this wouldn't necessarily have failed, there are a number of things that won't work that way.
  • edited February 26, 2013
    Thanks, now my translator is working as expected in FF and Google Chrome. I would like it to work for IE too, is IE Connector available?
  • edited February 26, 2013
    http://www.zotero.org/downloadbookmarklet
    there won't be a dedicated IE connector, but this should work pretty well.
  • edited February 26, 2013
    Thanks. It worked for single webpage in IE9 but not for multiple links on a webpage, most of the time we have to do bulk/batch download to Zotero library.
  • again, I'd need to see the translator to say more. Generally the bookmarklet works for multiples, you can try it out e.g. on pubmed
  • Can I use Debug Output Logging and submit the output log to Zotero server?
  • It's hard to get good debug from the bookmarklet. What's the problem with sharing the translator? Surely the database is protected by IP recognition or passwords, so you wouldn't provide any unauthorized access.

    I won't advise on proprietary/secret code for free, I doubt anyone else here is interested in doing that.
  • edited February 27, 2013
    If you want to look only at the translator code then it gets included in the debug output log. If you want to test it on our website then I will have to build something specially for you to keep all the test tables separate from our tables which contain some secure information. Due to time constraints, I do not know if I will get the time to build a test site at this moment. My users can still download from FF and Google Chrome with Zotero Standalone. We will just use the those two browsers for now (although giving them IE access would have been ideal because they have to use IE for this site and have to switch to FF or Google just to download to Zotero).


    Thanks for your help.
  • I don't need a test site, I just want to look at the translator code as it is - just post the .js to gist.github.com or any other site where I can look at it.

    I don't have access to the debug logs so you'd have to send them, Dan would have to open them, fish out the relevant portions - it's a huge hassle _and_ the code is much easier to look at outside of the debug logs.
  • Ok, I have uploaded the translator and it can be accessed from here:

    https://gist.github.com/bakhles/c935ead20cedba8e9f90
  • mostly this looks pretty standard and should work. It's easier for you to troubleshoot this yourself, obviously, but the two things that look nonstandard to me are that you declare the var items outside of doWeb - I'd try declaring that inside the function as all other translators do - and you odd use of escaped single quotes in xpaths - something like
    //span[@id=\'loggedin\'] - why not just use //span[@id="loggedin"] (same for most other xpaths)
    Anything beyond that I'd ask you to take to zotero-dev, as this is getting a bit technical for a general audience:
    https://groups.google.com/forum/?fromgroups=#!forum/zotero-dev
    also, we really can only do so much troubleshooting of customized implementations, so you may have to figure this out by yourself or see if you can subcontract it out.
  • edited February 28, 2013
    As far as I know \' and " can be used interchangeably and should not cause any problems.
    Declaring a var globally as opposed to within a scope of a function depends on the usage of the variable, this code was written long time back and that time I think I was trying to access var items from the getdoc function. After that I made some modifications but var items remained as a global var. But I think that is also a non-issue as far as code execution is concerned.
    Is there a way for you to test the script for the bookmarklet against my code? It works for single page download but not for multiple downloads.
  • sorry, that's as far as I'll go.

    My advice would be to remove anything non-standard from the code as IE is notoriously finicky.
    I'm aware that those things work in principle - else they wouldn't work in Firefox and Chrome/Safari - but especially things like where you define variable can easily make a difference for running code in a bookmarklet.

    The other suggestion would be to try this with Zotero Standalone running if you haven't already, which may slightly increase the odds of it working. You could also see if removing IE compatibility helps - that lets Zotero Standalone do the translation. Given that that didnt' work for Chrome I'm not optimistic, but probably worth a try.
  • error 60953382
    I am using Firefox and sometimes I have this 'translation error'. how can I fix it?
Sign In or Register to comment.