citation not working in modified style

Hi,

I recently made some modifications to the Am. Soc. Agronomy style to be able to generate citations and bibliographies in the correct style for a particular publication that doesn't exactly match any of the styles I looked at. I followed the advice to find a close match and adjust it. The style I ended up with now is installed on my machine and generates correct bibliographies if I drag and drop. However, in both Word and OpenOffice writer inserting a citation does not work. I get the error "zotero experienced an error updating your document this.itemset is undefined." If I use the original Am. Soc. Agronomy style, it works.

Can anyone suggest to me what the problem might be and how I can fix it?
  • Provide a Report ID after you get the error.
  • It sounds like the style might be invalid CSL. There is an online validator (search for validator.nu), that you can use to check it. Let us know how it goes; if validation turns up errors, you'll need to fix them up before going further.
  • edited March 22, 2010
    I'm not very familiar with the validator, but I pasted in the code for my modified style and got 7 reported errors. However, the same errors are reported for the style on which I based this one (Am Soc Agron). Other styles also have reported errors. As the Am Soc Agron style works, this doesn't seem to be the cause of my problem.

    I generated an error report, number 1641124643. Presumably the pertinent one is the last one.

    I can zip the file for the style and send it to someone if that is necessary.

    Your help is appreciated.

    Barry Cooper
  • If you got errors from validator.nu with styles from the repository you most likely did something wrong using it - those styles are all valid (they're automatically validated on submission and flagged if invalid). Reread the instructions on the page fbennett links to.

    Also, paste the content of the style to gist.github.com, create a public gist and post the url here so we can have a look. No promises, but maybe someone has the time to look and it will take you only 2 mins.
  • I'm sure I did something wrong in using validator.nu. I just did another validation run using some different settings: I pasted the style code into Text Field, put the URL for the schema (as indicated on the page fbennett indicated into the Schemas field, and chose Preset none, Parser XML don't load external, and Profile permissive. I have no idea what to put in XMLNS Filter so I left it blank. I checked the Be Lax option. Using those settings the style doesn't report errors but I still get the error I initially reported when I try to insert a citation in Word 2008 (Mac).

    So, should I continue to pursue a potential problem with the style code or is something else the problem? Were my settings for validator.nu appropriate? I haven't pasted the code to gist yet but will do so if you think it is still worthwhile.

    As always, I appreciate your patience and help.

    Barry Cooper
  • edited March 22, 2010
    OK, again thanks for your help, but problem solved. As an aside, as a non-programmer who nevertheless sometimes has to try to work out problems with code, I often find that I identify the problem myself after asking for help. Your suggestion that something was wrong in the modified style I created turned out to be correct, even though the citation showed correctly on the Zotero test pane and the style code validated, as above. I decided to start going through the code line by line comparing it to the original. I quickly found that I had somehow, accidentally, deleted the URL inside the <id>..</id> tags. As it was unintended, I hadn't noticed it. I'm not sure why the validator didn't catch this.

    Anyway, I am reporting the reason just in case someone else has a similar problem. Again, I thank you for your help.

    Barry Cooper
  • Is the style behaving well for you in the word processor now?
  • Yes, thanks.

    BC
  • If it is working, you may want to contribute the style to the repository for others to use. Post it somewhere, like http://gist.github.com/, and post a link here when you're satisfied with the style, and someone can double-check it and add it to the repository.

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.