[citeproc-js] Error updating citation in Word 2013 (sortedItems.slice)

I am having trouble inserting or editing 2 citations using the Word 2013 plugin. Each time I try to insert either of these 2 citations, I get the same error message which includes a message with this code:
"citations[(j - 1)].sortedItems.slice(...)[0] is undefined"

The Debug ID is D1138723646.

I'm using 4.0.1 standalone (x86) with a custom style: Academy of Management Review (but happy to change styles if this will solve the problem)
  • first, make sure that you're actually using 4.0.12 not 4.0.1 - otherwise, upgrade and see if the error persists.
    When you say "custom style" - do you mean you have manually adapted the AMR style from zotero.org/styles or do you just mean you're not using one of the pre-installed styles? If you did customize your style then yes, we'd want to know if the problem persists with another author-date style.
  • Thank you for your help. I updated to 4.0.12 and tried the Firefox plugin instead of stand alone and that still delivered the same error.

    I then changed my style from the AMR style I got from the Zotero website to the stock standard Elsevier Harvard and it delivered the same error.

    I also installed Zotero on a different computer running Word 2010 instead of 2013. This still delivers the same error.

    This error is now given when adding any new sources to my thesis. This problem does not occur when adding citations to a new document.
  • this shouldn't happen, but you're probably best off running through this:
    http://www.zotero.org/support/word_processor_plugin_troubleshooting#debugging_broken_documents
    please save a copy of the broken document, it may be of interest to one of the devs working on the Word plugin.
  • Thanks, I think it may have been the caption issue as it seems to be working ok now. I pasted the content into a new doc and removed the captions and it seems OK now -thank you!

    I'm happy to donate the buggy copy to any devs if they want them
  • Seems like this was a problem with the AMR CSL file. I changed it back to AMR on my other computer and the problem returned. I will stick to the standard CSL styles for now.
  • AMR really is no less standard than the pre-installed styles, so if you're really just using the style from the repository, I'd be surprised if that's the cause. Are you sure this wasn't still an issue with captions?
  • There are two problems. The first problem is that there's an empty citation your document (it has no items in it). I'm not sure how you managed to create this, but it's not supposed to be possible. It has citation ID 14d3v0ri44; you should be able to find and delete it by pressing Alt+F9 to show field codes, using Word's find tool to look for "14d3v0ri44", deleting it, and pressing Alt+F9 to hide field codes again. If you have any insight into how this citation came about, it might help us fix the issue that produced it.

    The second problem is that this empty citation triggers an issue in citeproc-js, but maybe only in styles that sort citations.
  • Thanks Simon, I found 14d3v0ri44 which just seemed to be like any other citation with an author and a year. So I'm not sure how it turned out blank.

    I tried with AMR and then also with Organization Studies which prodcued the same citeproc-js issue and both work -thank you for your help.
Sign In or Register to comment.