Bug report: Multiple authors in wrong order after export->import

Bug report: Multiple authors in wrong order after export->import

Bug description:
I exported a large zotero libary (Zotero RDF). On the other computer this library was imported. With about 10 articles that have many authors, I realized that the order of the authors was changed and is now wrong. Even the first author has changed after importing it.

Please try following articles:
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2583992/
http://www.ncbi.nlm.nih.gov/pubmed/12818747

After they are in the zotero database, please export and import them again. The order of the authors will be distorted and wrong.
  • edited October 2, 2010
    I can confirm this behavior. It looks like a sort on an index number is trying to happen internally, but the value is of type "string" rather than type "number". That would explain why the names are in sequence, but those at positions 10 and 11 (in the first link) jump to the top.

    If this is the cause, it should be simple to fix (in the source code). I'll do some spelunking and report back on the outcome of that small adventure.
  • I've isolated the problem. As expected, a string-based sort operation takes place, deep in the RDF machinery (in code which does not originate from Team Zotero, I think), which contains the sequence numbers that are meant to keep lists (like the list of authors) straight. For general information, the location in the source code is xpcom/rdf/serialize.js, at line 580 or thereabouts.

    I've done up a patch that I've uploaded to a fresh ticket for review by the developers.
  • @fbennett: Thank you for your quick answer and fix. Does it mean that the issue will be fixed in one of the next 2.0.x versions?
  • edited October 3, 2010
    We'll have to wait and see, but as there is clearly bug in the works affecting RDF export, I'd say it's very likely that either this patch or something more efficient will be merged to a 2.0.x release in the reasonably near future. I should mention that another patch that I recently submitted for (a different area of) sorting behavior was the cause of unexpected problems when it was merged to a release (it fixed some sorting issues, but created others). Based on that experience, it would be reasonable to expect review of this one to tend toward caution.
  • fbennett's patch is available in the latest 2.0 Branch dev XPI. If you'd like to test it, install that over Zotero 2.0.8 and switch back to 2.0.9 when it comes out, which should be this week.

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.