Disambiguation: add year when only necessary

Hello,

I am trying to make a (author,date) format where the date is only added when a single author has multiple books. Also if the same author has multiple books published the same year I would like to add a year suffix to disambiguate.

For instance,
1. (Egoyan)
2. (Brannigan, 2009)
3. (Brannigan, 2011)
4. (Barrot, 2005a)
5. (Barrot, 2005b)

I pasted the code I was expecting to work there:
https://gist.github.com/3025580

Instead of working, zotero just crashed when I tried to insert a second citation by an already cited author (when the if is true). The crash says "XULRunner has stopped responding..."

Configuration: Zotero Standalone 3.0.7 with Office 2007. Running on Windows Vista
  • Post the whole style. I see what you're wanting to do from the fragment, but we'll need the whole style to test it.
  • the code snippet works - we'd want to see the whole style, though - did you validate it?
    Also, did you try your code in the test panel?

    If this is a very large document, you could get an XULRunner freeze (which "stopped responding" is - a crash would be when it closes unexpectedly) just because it's busy - do you have an option to continue? Did you try that?
  • I have updated the gist.
    Yes, I tried in the test panel, but the test panel has no disambiguation feature, so I guess it only means the csl is valid.

    It is not a large document, I am taking a whole new word document and try to insert 2 citations by the same author.
  • some more precision on the freeze:

    When I add the first citation in word using the addin, it works fine and I get only the last name of the author as expected.

    When I add a second citation in word by the same author, I see the citation in the zotero bar, and when I press Enter, the green progress bar freezes, and nothing happens. If I click anywhere, I get the windows message that XULRunner stopped responding. I can click Continue, but I don't think it will ever get back.
  • Interestingly, taking out disambiguate-add-year-suffix="true"
    made it work
  • I can replicate this in the test panel by selecting two disambiguating citations. The style validates, so this is clearly a bug, fbennett will take it from here.
  • I'm able to reproduce the freeze here, and making the year-suffix explicit with <text variable="year-suffix"/> doesn't help. This should work, there is clearly a bug in the processor. More soon.
  • I mean not crash. Obviously, it is not adding the suffix to the date
  • Ok great, thank you very much.
    Your response time is amazing!
  • I've released a revision to the processor that fixes this. Zotero 3.0.8 is on the verge of release, so if the new processor version makes it into the release, this will heal automatically when you upgrade.

    You can test the fix immediately (and it would be helpful if you could do so) by installing this plugin, which upgrades the processor in a running Zotero. It should be installable as an extension to Standalone as well as in the Firefox version. When testing with the plugin the first time out, be sure to use it on a test document or two first, just in case there are problems.

    Assuming the processor upgrade makes it into Zotero 3.0.8, you should remove the plugin when you update to the new Zotero release, to allow processor upgrades in future releases to take effect.

This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.