Problem with proxy redirection
Hi,
I have a problem with proxy redirection since I upgraded zotero a week or so ago, I'm currently using version 2.1.5.
The entries in the Proxy redirection tab of the preferences haven't changed but Firefox now opens sites directly; previously when I clicked on a journal link in Thunderbird, Zotero automatically kicked in in Firefox and redirected through my institutional proxy (for journal access only) and gave me full access to the journal. Now I'm going straight to the link in the email, through which I only have public access, thus no papers.
I've tried deleting the entries in the table on the Zotero->Preferences->Proxies tab but this hasn't worked.
It's a really useful feature, so any help would be greatly appreciated.
Dave.
I have a problem with proxy redirection since I upgraded zotero a week or so ago, I'm currently using version 2.1.5.
The entries in the Proxy redirection tab of the preferences haven't changed but Firefox now opens sites directly; previously when I clicked on a journal link in Thunderbird, Zotero automatically kicked in in Firefox and redirected through my institutional proxy (for journal access only) and gave me full access to the journal. Now I'm going straight to the link in the email, through which I only have public access, thus no papers.
I've tried deleting the entries in the table on the Zotero->Preferences->Proxies tab but this hasn't worked.
It's a really useful feature, so any help would be greatly appreciated.
Dave.
This discussion has been closed.
Dave.
I tried logging zotero output, and there does seem to be a suspicious looking entry. There is some error that says:
JavaScript Error: "browser is not defined" {file: "chrome://zotero/content/xpcom/proxy.js" line: 411}]
I am on a 64-bit Ubuntu machine with 64-bit Firefox 4
Hope this can be fixed, as it is a nice time saver.
The proxy table is fully populated, I just don't get any redirection.
Let me know if you need any more information - my error report doesn't seem to contain anything useful.
I hit the same bug/problem/whatever (that doesn't help anyone) and I may have found a workaround (this might may useful).
As previously described, the problem seems to come from the _getBrowserAndWindow function in xpcom/proxy.js.
I didn't investigate if this is a Firefox/Gecko issue or a Zotero one (or a bit of both) but the problem is that for some reason windowMediator.getZOrderDOMWindowEnumerator("navigator:browser", true) may return a empty enumerator. The consequence is that the "browser" variable is not initialized because the while loop in which it should be updated is never run. Hence the resulting javascript error.
I managed to get the proxy stuff working by using the getMostRecentWindow method instead of getZOrderDOMWindowEnumerator, leading to the following modified code:
function _getBrowserAndWindow(notificationCallbacks) {
try {
var pageDOMDocument = notificationCallbacks.getInterface(Components.interfaces.nsIDOMWindow).top.document;
if(!pageDOMDocument) return false;
var window = windowMediator.getMostRecentWindow("navigator:browser");
browser = window.gBrowser.getBrowserForDocument(pageDOMDocument);
} catch(e) {}
if (typeof(browser) == "undefined") /* should never be true */
alert("No browser! (Zotero's proxy.js has a boo boo)");
return [browser, window];
}
The way the browser is retrieved is slightly different but the behavior should be quite similar.
I only tested this code with Firefox 4.0.1 and Zotero 2.1.6 on Ubuntu 10.10 (64 bits). I have no idea if this code would work anywhere else! You have been warned...
Hope this helps
Edit:
I made the modified proxy.js accessible here: http://pastebin.com/mTuhSSAf
the "diff" version here: http://pastebin.com/wJQr0h4b
and the modified zotero.jar file here: http://www.mediafire.com/?sh41bp2zj9cc7af
https://www.zotero.org/trac/ticket/1819
I have a similar problem in that I go a link for a paper, zotero does some redirection which then eliminates the paper - blank screen. I have read the discussion here and I think there is a fix, but not sure how to implement it?
firefox version 3.6 and zotero version 2.1.8
thanks in advance for help,
Frances
Closing this thread, since the issue it refers to is fixed.