Problem with style after upgrading to 2.1.5
Hi, I recently updated to 2.1.5 and I have a problem with an homemade style I made. Before the update, everything was fine with this same style.
I can install my homemade style, but when I try to create a bibliography, or I try to cite it, I get an error. When I try to chrome://zotero/content/tools/csledit.xul, I get this error :
Error parsing style :
TypeError: token.strings is undefined
I tracked the changed I made to the style using GIT, and here are a diff between a working version and a non-working version (the - lines are from are from the functionning version, while the + lines are from the disfunctionning function).
<macro name="access">
<group>
- <text value="[En ligne]" suffix=" "/>
+ <text value="En ligne" suffix=" <"/>
<text variable="URL"/>
- <group prefix=". Consulté le " suffix="">
:
+ <group prefix=">. Consulté le " suffix=""
<text term="" text-case="" suffix=" "/>
Does anybody have any idea where would be the bug ?
I can install my homemade style, but when I try to create a bibliography, or I try to cite it, I get an error. When I try to chrome://zotero/content/tools/csledit.xul, I get this error :
Error parsing style :
TypeError: token.strings is undefined
I tracked the changed I made to the style using GIT, and here are a diff between a working version and a non-working version (the - lines are from are from the functionning version, while the + lines are from the disfunctionning function).
<macro name="access">
<group>
- <text value="[En ligne]" suffix=" "/>
+ <text value="En ligne" suffix=" <"/>
<text variable="URL"/>
- <group prefix=". Consulté le " suffix="">
:
+ <group prefix=">. Consulté le " suffix=""
<text term="" text-case="" suffix=" "/>
Does anybody have any idea where would be the bug ?
Then:
<group prefix=">. Consulté le " suffix=""
<text term="" text-case="" suffix=" "/>
that looks wrong. The <group needs a closing bracket:
<group prefix=">. Consulté le">
and you can't have an empty text term in the line
<text term="" text case="" suffix=" "/>
that looks like you can just delete it.
Using & lt ; and & lg ; seems to solve it. I'll continue to test with my other changes, but thanks for now !
What I don't understand though, is why it did work before and stopped after the upgrade (I also upgraded to Firefox 4 then downgraded to 3.6)
Note : About the closing bracket, it was a mistake in my copy-paste : I did have in my code.
Thanks again
I have the same problem as the one of stephanecouture since I have updated firefox to 4th version.
Unfortunately, I do not understand the solution of this problem "Using & lt ; and & lg ; seems to solve it.". Could you explain me how I can modify my own style in order to this works again ?
My configuration :
Zotero 2.1.6
Word integration 3.1
OpenOffice integration 3.5a1
Word 2007
Openoffice 3.2
https://gist.github.com/923048
- In the first block, there is a second "name" element inside "names". There can only be one, so move the "and" attribute up to the legal "name" node and delete the extra one.
- In the second block, there is an empty "else" node, which is illegal. It doesn't serve any useful purpose, so it can be deleted.
- In the third block, the < and > characters are illegal inside an attribute, and should be replaced with the < and > strings, as discussed above.
You can pick up a copy of the style file with these changes here.--- infiles/MyStyle.csl 2011-04-16 21:06:31.361571002 +0900
+++ infiles/mystyle.csl 2011-04-16 21:06:16.641571002 +0900
@@ -37,12 +37,12 @@
<name initialize-with="."
delimiter=", "
delimiter-precedes-last="always"
- name-as-sort-order="all"/>
+ name-as-sort-order="all"
+ and="text"/>
<label form="short"
prefix=" ("
text-case="capitalize-first"
suffix=".)"/>
- <name and="text" delimiter=", "/>
</names>
</macro>
@@ -53,9 +53,6 @@
<date-part name="year"/>
</date>
</if>
- <else>
-
- </else>
</choose>
</macro>
@@ -148,8 +145,8 @@
<else-if type="webpage">
<group delimiter=" ">
<text variable="URL"
- prefix="<"
- suffix=">." />
+ prefix="&lt;"
+ suffix="&gt;." />
</group>
</else-if>
Have a nice week-end !
It tells me that I have a problem with the undefined date-part ... can't seems to find it !
Help please :)
https://gist.github.com/945026
you need at least one <date-part-name element in there, as in
<date variable="issued">
<date-part name="year"/>
</date>
(or delete the entire line 49)
Also, your update date isn't in valid format - that might not break the style, but in order to validate I'd recommend just copying it from another style.