New error in 2.0rc5 (csl related)

After upgrading to 2.0rc5, I get this new error when I try to create a large bibliography (700 items, half of it Zotero won't do either) with a csl style that until now worked fine, and still does so with smaller collections (I tried with up to 150)

[JavaScript Error: "string.length is not a function" {file: "chrome://zotero/content/xpcom/csl.js" line: 989}]

I went to that place in the script and get no clue about it.
  • I found out something more:

    The error is not related with the amount of processed items. The error occurs processing the following:

    article-journal article-magazine article-newspaper

    And only if the "issued" variable contains month and day.

    In the csl I use at the following point the error occurs, and I can't see what's wrong with the csl:

    <date variable="issued" suffix="">
    <date-part name="day" suffix="."/>
    <date-part name="month" suffix="."/>
    <date-part name="year"/>
    </date>
  • edited February 16, 2010
    Where are you trying to make this bibliography? In MS Word or Open Office? Does it only occur in the word processor or does it also happen in the Zotero reference test pane?

    chrome://zotero/content/tools/csledit.xul

    The suffix in this <date variable="issued" suffix=""> seems redundant, but I doubt that is causing the problem.
  • @ James: The error occurs when I try to create a bibliography inside Zotero. In the test pane, the same thing: If there's no Day and Month in "issued", no problem, if there is Month and Day, it won't work at all.
  • Given that it only affects article-journal, article-magazine, and article-newspaper could it be the consequence of another part of your code which tests for these item types?

    I don't think there is anything wrong with code you posted above in isolation, but perhaps there is a problem elsewhere. Needless to say, there are many other styles which use identical or near identical code to what you've posted above without problem.
  • @ James:

    I still do think it is just there where this NEW error appears (until the last upgrade it always had worked).

    I removed two lines from my csl, and now all works fine (and day and month in the output get lost...):

    <date variable="issued" suffix="">
    <date-part name="year"/>
    </date>
Sign In or Register to comment.