Not signed in (Sign In)
Quick Links
Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
-
- CommentAuthorfbennett
- CommentTimeMay 29th 2011 edited
I am pleased to announce a Firefox add-on that extends the Zotero client user interface with per-collection browsing history.
(Edit: for use with Zotero 2.1.6 or above.)
As those who have seen my office (or indeed the code I have written) can attest, I do not have a flair for organization. Zotero provides at least four separate ways of ferreting meaning out of a library: search; tag filtering; related-items links; and free-form browsing within a library or collection. Now that, with the advice and assistance of many, I have at last gotten the citeproc-js processor into a stable condition, research beckons -- and I can see that the prospects for replicating my office inside my Zotero library are better than even.
I've tried to fend off disorder in advance with this plugin. Without any special action by the user, it tracks the items visited from the starting point of a particular collection. It works sort of like this:- Each collection or smart search and each top-level library or group has its own separate history list.
- To keep things sparse and comprehensible, items are added to a given history list only once.
- For the same reason, clicks on child items will only add their parents.
- Items outside the "governing" collection (i.e. items removed from the collection after being first viewed there, or those added via a "Related" link, without explicitly selecting a separate collection in the left panel) are presented seamlessly as part of the navigable collection-based history list.
- A "Select all" context menu option makes it easy to capture the items in a collection history and (say) drop them into a freshly minted collection if desired.
The plugin can be installed by clicking on the following link to the Zotero Item History XPI. Feel free to post a note here if you have difficulties; I can't guarantee full support, but it should work on all platforms.
I've put the source code under the AGPL, and I will put a copy online fairly soon. Quite a bit of work was needed to get this external tool to smoothly shadow the Zotero interface, [1] and it might provide a starting point for building similar extensions to support other workflows.
[1] Let's hope that "was" in this sentence doesn't beg to be changed to "would have been". -
- CommentAuthorclio_13
- CommentTimeMay 29th 2011
hmmm - downloaded fine, but then I get "Zotero Item History could not be installed because Firefox cannot modify the needed file".
Ubuntu and Firefox 4.0.1 -
- CommentAuthorfbennett
- CommentTimeMay 29th 2011 edited
Aha. I wondered about that. I've piggybacked on the Zotero database infrastructure, which wants to install the database in the Zotero data directory. It works fine here (Linux) but it could be that's where it's breaking for you. Is there a hint of the target filename in the log?
(Edit: Oops. Ubuntu, you say. Hmm. Which version?) -
- CommentAuthorclio_13
- CommentTimeMay 29th 2011
Ubuntu 11.04 -
- CommentAuthorclio_13
- CommentTimeMay 29th 2011
just tried Win XP - I get past the hurdle mentioned above - firefox then claims the plugin will be installed at restart, but when the restart is done, there is no sign of the plug-in.
Not sure what information you need for this to be any help ? Let me know what I can provide and how. -
- CommentAuthorfbennett
- CommentTimeMay 29th 2011
I can't replicate the error in Ubuntu 10.x. Time to capitulate to the popup messages I've been receiving over the past weeks and upgrade, I guess. I'm not sure whether this is a security issue (which might require a significant amount of coding to work around the fault) or just a packaging thing. We'll see; I'll post again when I have something to show. -
- CommentAuthorfbennett
- CommentTimeMay 29th 2011
There's only one thing: do you see any suspicious errors in Firefox Tools -> Error Console? If not, I'll try to get access to a Windows machine tomorrow and see if I can make it fail there. This little app doesn't have the nice debugging infrastructure of Zotero, and under Windows I'm not exactly sure how to obtain error traces (and in any case, the code doesn't generate any chatter, so Error Console is probably all we'd see anyway).
We'll get there, though. -
- CommentAuthorclio_13
- CommentTimeMay 29th 2011
On the Windows machine there is nothing of interest in the error console, neither before nor after the restart.
More luck on the Ubuntu 11.04 machine :
Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIFileOutputStream.init]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/components/nsSessionStore.js :: sss_writeFile :: line 3975" data: no]
Source File: resource://gre/components/nsSessionStore.js
Line: 3975
Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIFileOutputStream.init]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/components/nsSessionStore.js :: sss_writeFile :: line 3975" data: no]
Source File: resource://gre/components/nsSessionStore.js
Line: 3975
Hope that's relevant - it certainly appeared just after the error.
Really looking forward to this plugin - thanks for the hard work! -
- CommentAuthorfbennett
- CommentTimeMay 29th 2011 edited
On the Linux machine, you might try grabbing the XPI file itself with something like this from the command line:wget http://gsl-nagoya-u.net/http/pub/zotero-item-history.xpi
then, visiting the Firefox profile extension directory, adding a subdirectory "zotero-item-history@mystery-lab.com":mkdir ~/.firefox/mozilla/<funny_chars>/extensions/zotero-item-history@mystery-lab.com
then putting the plugin there and unzipping it. If Firefox will run it from that point, we can narrow this down to a security issue, under Linux at least.
(Edit: I haven't been able to find a reference on the Net that exactly reflects this error. The module failing can apparently be associated with local file permissions issues, encryption service denials, and antivirus protections. I suspect the latter, but don't really know. Before tackling the issue, I'll try to get better information on whether it is permissible, in the Firefox architecture, for one plugin to install software in a directory created by another. If that's okay, then maybe it's just a matter of trusted signing or something.) -
- CommentAuthorfbennett
- CommentTimeMay 29th 2011
As another low-cost poke in the dark, possibly some FF clients want to see the chrome directory zipped into a jar file. I've just refreshed the copy at the original link with a build in that form. Limited expectations, but if you click on the link again and it works this time, that would be wonderful luck. -
- CommentAuthorclio_13
- CommentTimeMay 29th 2011
tried installing from the link again - same error.
Also tried the manual installation approach but keep coming up against the fact that the shell claims that extensions directory is read-only and no amount of sudo will sort it out. My rather limited skills in command-line wizardry probably don't help, but I can't create the directory to put the .xpi into it -
- CommentAuthorfbennett
- CommentTimeMay 29th 2011
Hmm. Looks like Ubuntu 11.04 is going to be an interesting experience. But if you don't have trouble installing other plugins, there must be a channel through which we can inject this. I'll need to learn more about Firefox package distribution, looks like. -
- CommentAuthorGracile
- CommentTimeMay 29th 2011
I'm unable to install it with firefox 3.6.17 (and zotero 2.1.6, win 7). -
- CommentAuthorajlyon
- CommentTimeMay 29th 2011 edited
I managed to install on top of multilingual (Ubuntu 11.04; Firefox 4.01, no special magic required), but the buttons seem perpetually disabled / grayed-out. Am I missing something?
Also, I think you should be able to tap into Zotero's debug logger if you want to-- if you have access to the Zotero object, then you have access to things like the debug function. -
- CommentAuthorfbennett
- CommentTimeMay 29th 2011
@clio_13, @ajlyon, @Gracile,
I've pushed a fresh copy to the same URL that may work a bit better. I've borrowed some more install logic from Zotero, eased a restriction to Firefox 4 (it may work with 3.6, I'm not sure), and made the attachment of "listeners" to the Zotero UI a little more robust. The plugin will also try to issue debugging output via Zotero.debug, if it's available. -
- CommentAuthorfbennett
- CommentTimeMay 29th 2011
@ajlyon,
Working on class prep this morning, I see that the buttons stay inactive under one combination of conditions: if Zotero is set to Tab mode and Firefox is restarted, and then Zotero is changed to Pane mode, the buttons stay inactive until a return to Tab mode.
The other way around -- starting with default Pane mode, and then switching to Tab mode -- seems to work in both modes. The mode switch is a great mystery to me, but I'll keep an eye on this and see if I can work out what the deal is with that one combination. -
- CommentAuthorclio_13
- CommentTimeMay 30th 2011
Yay - it now installs on the linux machine (haven't tried Windows yet) - but I am having the same issue as Ajlion, the buttons stay inactive. And changing from the tab it started into to pane and back did not help. -
- CommentAuthorfbennett
- CommentTimeMay 30th 2011
Well, half a positive report is better than none -- and the install failure was surely the highest hurdle. Do you see any errors in either the Firefox Error Console or the debugging log? In the debugging log, you should be able to find them by searching for the word "ZoteroItemHistory". -
- CommentAuthorclio_13
- CommentTimeMay 30th 2011
Nothing in the Firefox error console, this is the debug log for me clicking on several items in a collection : http://pastebin.com/W2YZ5zCr -
- CommentAuthorfbennett
- CommentTimeMay 30th 2011
Meanwhile, I have a small further revision idea brewing. In nested subcollections, items browsed could be added to the parent collection lists as well. The highlighted item in the menu list at higher levels could then show which subcollections the item appears in, by calling the same function that Zotero ties to the ALT (under Linux) key. That would give us a bit of cross-collection awareness similar to the behavior with the recursiveCollections hidden option, but without the top-level clutter. -
- CommentAuthorclio_13
- CommentTimeMay 30th 2011
That set me wondering : I had recursive collections on for all the previous testing, but turning it off doesn't make it work either. -
- CommentAuthorfbennett
- CommentTimeMay 30th 2011
I've just put up a fresh copy with some changes that should improve things. This new copy will also dump a little more debugging output, to help us hone in on the source of the button activation failures. -
- CommentAuthorfbennett
- CommentTimeMay 30th 2011
I should have mentioned that recursiveCollections shouldn't make any difference either way. I had it turned on the whole time I was writing the code for this. -
- CommentAuthorclio_13
- CommentTimeMay 30th 2011
so close - reinstalling the newest version means the green down arrow and the house-icon turn green when I click on items in a collection. But clicking on the green arrow doesn't take me back and although clicking on the house opens up a list, clicking on an item in the list doesn't take me anywhere. Debug-logging for, successively, clicking on items, trying the arrow to go back and trying to get at an item in the logged history-menu : http://pastebin.com/GBfQqNPE -
- CommentAuthorfbennett
- CommentTimeMay 30th 2011 edited
It's failing to find a Zotero item. I can make it fail past that, but it should not happen; possibly an earlier attempt with a bad client pushed some bad data into the list. Try clearing the list (right-click on the house, select "Clear collection history"), and clicking on some items in the collection again. -
- CommentAuthorfbennett
- CommentTimeMay 30th 2011
Yay. In testing my fanciful collection-highlight extension, I'm getting the same error shown in your trace ("item.inCollection() is not a function"). We're near the end of this little journey. -
- CommentAuthorclio_13
- CommentTimeMay 30th 2011
I tried clearing the collection history - that didn't make a difference, still the same result of the arrow not doing anything (despite appearing in green) and the items in the list under the house not being called up upon a click -
- CommentAuthorfbennett
- CommentTimeMay 30th 2011
Try now. I found the source of the error in your log (and was suffering from it myself, it turns out). I've also implemented upward cascading (so items clicked upon in subordinate collections will be recorded on the lists of their parents as well). After playing with it, I decided there's no point in implementing automated highlighting when scrolling over items in the pulldown list -- it's easy enough to touch the key on items of interest, so the extra complexity is not really needed.
See how it goes; I'm hopeful that this one will get you going. -
- CommentAuthorclio_13
- CommentTimeMay 30th 2011
Brilliant - well done! Works flawlessly now and is already proving incredibly useful (writing a big paper and trying to find all useful material in a v big collection...)
Thanks again! -
- CommentAuthorfbennett
- CommentTimeMay 30th 2011 edited
Great! I too am finding this useful here, although my collections are still comparatively small.
Enjoy!
(And thanks all around for the patient feedback during debugging.) -
- CommentAuthorfbennett
- CommentTimeMay 30th 2011
For anyone interested, I've put the source code of the plugin online at BitBucket. -
-
CommentAuthorRintze
- CommentTimeMay 30th 2011
Your repo is currently a private one. -
-
- CommentAuthorfbennett
- CommentTimeMay 30th 2011
So that's what that little lock icon means. :)
Thanks for catching that. It should be public now. -
- CommentAuthormigugg
- CommentTimeMay 30th 2011
Hi Frank,
I tried to install on Mac with ff 3.6 and zotero 2.1.6. Result: plugin is installed but when I reopen ff, I cannot see the buttons, no trace of the plugin, and the following in error reports:
[JavaScript Error: "Components.classes['@mystery-lab/ZoteroItemHistoryService;1'] is undefined" {file: "chrome://zotero-item-history/content/main.js" line: 27}]
but thanks for a potentially nice plugin! -
- CommentAuthorfbennett
- CommentTimeMay 30th 2011
Try now. There was likely a problem acquiring the correct pathname on Windows machines and the Mac. -
- CommentAuthorkithairon
- CommentTimeMay 31st 2011
Any chance to have your plugin work in FF 5.0beta? The installing process doesn't produce any errors, but I end up with no visible signs of the plugin in the UI, despite Add-on comp. reporter installed. (I'm on OS 10.6.7, using Zotero 2.1.6, FF 5.0beta). Thanks. -
- CommentAuthorfbennett
- CommentTimeMay 31st 2011
I've relaxed the version restriction, and smartened up detection of the FF version. It should work now. -
- CommentAuthorkithairon
- CommentTimeJun 1st 2011 edited
Thanks for your plugin – appreciate your work and the useful addition in being able to trace my own tracks around collections. Your v.03 works fine with FF 4.01 and the current stable version of Zotero. Attempts to use it with FF 5beta were less successful, (straight error message in dialog-box at startup); likewise unsuccessful to run it with Zotero's 2.1 trunk, both with FF4.01 and FF5b: (screenshots). The icons were loading but the whole icon bar was displaced to the left and my data, tags and part of the UI was gone. (All other Add-ons were disabled when doing this). Console mentions a few of those:
TypeError: Components.classes['@mozilla.org/extensions/manager;1'] is undefined
2011.06.01 08:54:12 [0x0-0x2fc2fc].org.mozilla.firefox[3677]
TypeError: Components.classes['@mozilla.org/extensions/manager;1'] is undefined
2011.06.01 08:57:47 [0x0-0x2ff2ff].org.mozilla.firefox[3702]
TypeError: Components.classes['@mozilla.org/extensions/manager;1'] is undefined
Rolled back to FF4 and 2.1.6 for the benefit of 'Item History' for the time being. Thanks, Kithairon -
- CommentAuthorfbennett
- CommentTimeJun 1st 2011 edited
I've just pushed a fresh version (0.4), with support for temporarily "anchoring" browsing history to a particular collection, saved search or group.
On both the startup problems with FF5, and the problems with the 2.1 branch XPI, all combinations run without any problem here (on Linux, Ubuntu 10.x only, but against the multilingual branch, the trunk and 2.1.6). I'm not sure I can help.
The 0.4 version will at least log the appInfo string (used to identify the FF version), which is relevant to the test that seems to be failing in at least some of your trials (judging from the console log you've posted above). If that doesn't lead to an answer, people familiar with Mac and Windows platforms should probably take a look. I had a struggle to get the moving parts of Zotero and the plugin to work together smoothly, but the finished code is not very complex, and there isn't much of it. -
- CommentAuthorkithairon
- CommentTimeJun 1st 2011
Nice. Anchoring a collection seems useful. Tried running v.04 independently with FF5 and the last 2.1 trunk build. Nothing much has changed in regard to what I wrote in my last post, though the second screenshot in that post (blank library, displaced items, no tags and right panel) seems due to the trunk build rather than your plug-in (See here).
If I run 0.4 with FF5 I get an error on startup. Here the console output – maybe useful for knowledgeable Mac-folk:
2011.06.01 17:25:40 firefox-bin[5957] *** __NSAutoreleaseNoPool(): Object 0x11f0af9a0 of class NSCFDictionary autoreleased with no pool in place - just leaking
2011.06.01 17:25:40 [0x0-0x3c83c8].org.mozilla.firefox[5957] TypeError: Components.classes['@mozilla.org/extensions/manager;1'] is undefined
2011.06.01 17:25:40 [0x0-0x3c83c8].org.mozilla.firefox[5957] TypeError: Components.classes['@mozilla.org/extensions/manager;1'] is undefined
2011.06.01 17:25:40 [0x0-0x3c83c8].org.mozilla.firefox[5957] TypeError: Components.classes['@mozilla.org/extensions/manager;1'] is undefined
2011.06.01 17:25:40 [0x0-0x3c83c8].org.mozilla.firefox[5957] TypeError: Components.classes['@mozilla.org/extensions/manager;1'] is undefined
2011.06.01 17:25:40 [0x0-0x3c83c8].org.mozilla.firefox[5957] TypeError: Components.classes['@mozilla.org/extensions/manager;1'] is undefined
2011.06.01 17:25:40 [0x0-0x3c83c8].org.mozilla.firefox[5957] TypeError: Components.classes['@mozilla.org/extensions/manager;1'] is undefined
2011.06.01 17:25:40 [0x0-0x3c83c8].org.mozilla.firefox[5957] TypeError: Components.classes['@mozilla.org/extensions/manager;1'] is undefined
2011.06.01 17:25:40 [0x0-0x3c83c8].org.mozilla.firefox[5957] TypeError: Components.classes['@mozilla.org/extensions/manager;1'] is undefined
2011.06.01 17:25:40 [0x0-0x3c83c8].org.mozilla.firefox[5957] TypeError: Components.classes['@mozilla.org/extensions/manager;1'] is undefined -
- CommentAuthorGracile
- CommentTimeJun 1st 2011
(it may work with 3.6, I'm not sure),
I can install it to with firefox 3.6.17 (and zotero 2.1.6r9354, win 7) but nothing happens. -
- CommentAuthorkithairon
- CommentTimeJun 1st 2011
Item History now works fine with FF 4.01 (Mac) and the very latest 2.1 trunk build (r9406). -
- CommentAuthorfbennett
- CommentTimeJun 1st 2011
@kithairon: Yes. The only way that error can come out of the plugin is if it misparses the version string, which it pulls out of appInfo at startup (see the file history.js in the source). It should be logging that string (search for ZoteroItemHistory or appInfo). -
- CommentAuthorfbennett
- CommentTimeJun 1st 2011
Have put up a version 0.5. The only new thing is to disable the global context menu operations when trash is selected. I don't contemplate any further features (although forks and spinoffs are certainly welcome). -
- CommentAuthorfbennett
- CommentTimeJun 2nd 2011
Clicked around a little on a colleague's Windows machine with FF 3.6.17 this afternoon, and got the same failure as Gracile maybe. The error is actually thrown by Zotero itself, not the plugin code. Comparing what I've ended up doing in the loader with the original Zotero code, I think I see what the problem is. The plugin calls Zotero to build the database, but depending on the luck of the draw, it may call Z before it has loaded in which case, well, the story has an unhappy ending.
I should be able to push all of that code a little further down the boot chain, which might work a little better. Should happen this evening or sometime tomorrow. -
- CommentAuthorfbennett
- CommentTimeJun 2nd 2011
I've put up a fresh copy (version 0.6) that postpones the call to Zotero to a point where it might work a bit better on various systems. I haven't tested under FF 3.6 yet, but it's worth a try. -
- CommentAuthorGracile
- CommentTimeJun 2nd 2011
I haven't tested under FF 3.6 yet, but it's worth a try.
Nothing happens with FF 3.6. and ZiH 0.6. -
- CommentAuthorfbennett
- CommentTimeJun 3rd 2011 edited
Spent a little time with Firefox 3.6.17 on a Windows 7 machine, but no joy. It's an unfamiliar platform and I'll have to leave the debugging to others, unfortunately. The source code is available online, and I'll be happy to answer questions, and to grant write privileges to anyone interested in sprucing this up to run on platforms to which it is currently allergic. -
- CommentAuthormigugg
- CommentTimeJun 5th 2011
Hi,
tried again, now both with zotero 2.1.6 and 2.1.7 and your latest version. Still does not work. again mac OSX 10.5.5 and ff 3.6. But this time no errors that relate to the plugin
best
Michael -
- CommentAuthorfbennett
- CommentTimeJun 5th 2011 edited
(Just to be clear in case of possible misunderstanding, the fate of this plugin in environments other than my own will depend on the debugging efforts of other contributors.)

Upgrade Storage