When importing large files (my BibTex file has some 400 entries and about 300 contributors), I noticed that the order of the authors is lost, especially on the last items, as the ranks receive value 0 and the entries get the authors in the same order as they were entered in the database. I could reproduce the problem importing from both Bibtex and RIS formats.
To fix it, I assigned the author rank in the array using the array key itself (line 103 in the file biblio.contributors.inc, in the function _save_contributors):
function _save_contributors($contributors, $nid, $vid, $update = FALSE) {
$md5 = _loadMD5();
db_query('DELETE FROM {biblio_contributor} WHERE nid = %d AND vid = %d', array($nid, $vid));
foreach ($contributors as $cat => $authors) {
foreach ($authors as $key => $author) {
$author['rank'] = $key;
...
It seems to work now :)
Comments
Comment #1
rjerome commentedThanks for pointing that out, indeed that was a rather serious bug I inadvertently introduced recently.
It's fixed now and a new release will follow by the end of the day.
Ron.
Comment #2
waldow commentedHi Ron, Dean W. again...
I didn't notice that myself until today. :) I was going to submit a new bug report but saw this thread.
I was pretty tickled I got the importing to work without the blank white page. I was starting to really populate the biblio database today and we discovered this too. Sounds like you have a fix. I'll watch the releases and reinstall.
Thanks, again! Dean
Comment #3
rjerome commentedHi Dean,
Sorry about that, this one totally slipped by me. This module is getting so complicated that I'm going to have to spend some time and build automated testing, since it's almost impossible to manually test for all possible errors.
Ron.
Comment #4
waldow commentedNo apologies necessary! I appreciate the very good module and am glad to be a tester in a test! I would imagine it is not a simple one. I have been mainly a pedestrian coder in straight php and am just starting to think about how to translate my code into drupal modules... Quite a learning curve. Thanks again, Dean