When a user edits a publication, the authors are duplicated. The users aren't changing the author names at all. This means that the mapping between a drupal user and an author name no longer works for that publication. It confuses my users quite a bit. I can merge the authors to fix the problem, but it would be nice if I didn't have to do this after a user edits his/her publications.

Comments

rjerome’s picture

That issue sounds vaguely familiar, I just want to confirm that it's the 6.x-1.15 version you are seeing this with.

bstoppel’s picture

I am using 6.x-1.15

bstoppel’s picture

Just had a user email me that this happened to them again. Is there a patch that I can apply? Or can you point me to the place in the code to work out a solution?

rjerome’s picture

I haven't been able to reproduce this issue, so I can't offer any patches to fix it.

I can tell you that if the user changes ANYTHING in the author name it will generate a new author.

The code that determines if any changes have been made is at line 188 in biblio.contributors.inc

tomr’s picture

We seem to have the same problem using 7.x-1.0-rc3, although not for every user...

tomr’s picture

I think I found a workaround. What I did when the problem occurred, was to merge the new author (with one publication) into the existing one (with many publications). This would solve the problem, but it would reappear after the user made the next edit. I now do the merge the other way around, so merge the old author with the new one. If I do that, the problem does not reappear if the user edits a publication again.

rjerome’s picture

If you can reproduce this, I would really love to see the database records (in biblo_contributor_data) for the two authors before the merge. Hopefully that would lead to a resolution of this problem.

Ron.

bstoppel’s picture

Interesting tip tomr. I'm going to try that method.

Ron, here are the database records you requested. The first query is before, the second is after.

mysql> select * from biblio_contributor_data where lastname like '%Chaboo%'\G
*************************** 1. row ***************************
        cid: 963
        aka: 963
 drupal_uid: 179
       name: Chaboo, Caroline S
   lastname: Chaboo
  firstname: Caroline
     prefix:
     suffix:
   initials: S
affiliation:
        md5: 94c9ed05eeb65500854e53b4ae5a8464
1 row in set (0.00 sec)
mysql> select * from biblio_contributor_data where lastname like '%Chaboo%'\G
*************************** 1. row ***************************
        cid: 963
        aka: 963
 drupal_uid: 179
       name: Chaboo, Caroline S
   lastname: Chaboo
  firstname: Caroline
     prefix:
     suffix:
   initials: S
affiliation:
        md5: 94c9ed05eeb65500854e53b4ae5a8464
*************************** 2. row ***************************
        cid: 2549
        aka: 2549
 drupal_uid: NULL
       name: Chaboo, Caroline S
   lastname: Chaboo
  firstname: Caroline
     prefix:
     suffix:
   initials: S
affiliation:
        md5: bd68db1b180ac6aaa0aacc14c9f5cb81
2 rows in set (0.01 sec)
bstoppel’s picture

Tomr's workaround in comment #6 works for me too.

rjerome’s picture

Hmm, those database dumps don't get me a lot closer to a solution, the only thing that pops out is that in the first instance the biblio author is associated with a Drupal user ID.

I'll do a bit of testing and see if that is somehow related.

Ron.

rjerome’s picture

Still can't reproduce this, but I'm wondering if it has anything to do with collation (character encoding). If you notice in the two records the md5 values are different (which is why a new record is being created). The md5 value is calculated by combining the firstname,initial and lastname values then doing an md5sum on the result. To the naked eye those values appear to be the same in both records, however if the collation was different, then the actual byte values of the characters could be different, leading to differing md5sum values.

How did the entries get into the database originally? Were they imported from file? Do you have UTF-8 character encoding in both your database and webserver?

bstoppel’s picture

I'm definitely not a MySQL guru, so this is testing my knowledge :) But first, answers to the questions.

The records are entered in a couple of ways. The initial imports were done using a file import from a EndNote Bibtex export on a Mac. (Aside: I have found importing EndNote XML exports to be more reliable and to capture more data. For now, that is my preferred method.) Authors add new publications using another Bibtex export or, more likely, manually entry. I've trained them to do both, but I think the latter is easier for them to grok.

When I view the page info on the import and entry forms using Firefox, it reports UTF-8 encoding.

Below is a a query of the biblio tables' status.

Let me know if there is anything you'd like me to try.

mysql> show table status where collation like '%utf%' and name like '%biblio%' \G
*************************** 1. row ***************************
           Name: biblio
         Engine: MyISAM
        Version: 10
     Row_format: Dynamic
           Rows: 2100
 Avg_row_length: 925
    Data_length: 1943800
Max_data_length: 281474976710655
   Index_length: 198656
      Data_free: 0
 Auto_increment: NULL
    Create_time: 2010-12-29 09:34:21
    Update_time: 2011-12-01 15:05:05
     Check_time: 2010-12-29 09:34:21
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 2. row ***************************
           Name: biblio_collection
         Engine: MyISAM
        Version: 10
     Row_format: Fixed
           Rows: 0
 Avg_row_length: 0
    Data_length: 0
Max_data_length: 4785074604081151
   Index_length: 1024
      Data_free: 0
 Auto_increment: NULL
    Create_time: 2010-12-29 09:34:21
    Update_time: 2010-12-29 09:34:21
     Check_time: 2010-12-29 09:34:21
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 3. row ***************************
           Name: biblio_collection_type
         Engine: MyISAM
        Version: 10
     Row_format: Dynamic
           Rows: 0
 Avg_row_length: 0
    Data_length: 0
Max_data_length: 281474976710655
   Index_length: 1024
      Data_free: 0
 Auto_increment: NULL
    Create_time: 2010-12-29 09:34:21
    Update_time: 2010-12-29 09:34:21
     Check_time: 2010-12-29 09:34:21
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 4. row ***************************
           Name: biblio_contributor
         Engine: MyISAM
        Version: 10
     Row_format: Fixed
           Rows: 6714
 Avg_row_length: 25
    Data_length: 167850
Max_data_length: 7036874417766399
   Index_length: 191488
      Data_free: 0
 Auto_increment: NULL
    Create_time: 2010-12-29 09:34:21
    Update_time: 2011-12-01 15:05:05
     Check_time: NULL
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 5. row ***************************
           Name: biblio_contributor_data
         Engine: MyISAM
        Version: 10
     Row_format: Dynamic
           Rows: 2211
 Avg_row_length: 88
    Data_length: 195396
Max_data_length: 281474976710655
   Index_length: 130048
      Data_free: 492
 Auto_increment: 2550
    Create_time: 2010-12-29 09:34:21
    Update_time: 2011-12-01 04:23:07
     Check_time: 2010-12-29 09:34:21
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 6. row ***************************
           Name: biblio_contributor_type
         Engine: MyISAM
        Version: 10
     Row_format: Fixed
           Rows: 5
 Avg_row_length: 13
    Data_length: 65
Max_data_length: 3659174697238527
   Index_length: 2048
      Data_free: 0
 Auto_increment: NULL
    Create_time: 2010-12-29 09:34:21
    Update_time: 2010-12-29 09:34:21
     Check_time: NULL
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 7. row ***************************
           Name: biblio_contributor_type_data
         Engine: MyISAM
        Version: 10
     Row_format: Dynamic
           Rows: 18
 Avg_row_length: 24
    Data_length: 440
Max_data_length: 281474976710655
   Index_length: 2048
      Data_free: 0
 Auto_increment: 23
    Create_time: 2010-12-29 09:34:21
    Update_time: 2010-12-29 09:34:21
     Check_time: NULL
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 8. row ***************************
           Name: biblio_duplicates
         Engine: MyISAM
        Version: 10
     Row_format: Fixed
           Rows: 48
 Avg_row_length: 13
    Data_length: 1157
Max_data_length: 3659174697238527
   Index_length: 5120
      Data_free: 533
 Auto_increment: NULL
    Create_time: 2010-12-29 09:34:21
    Update_time: 2011-10-31 15:58:29
     Check_time: 2010-12-29 09:34:21
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 9. row ***************************
           Name: biblio_field_type
         Engine: MyISAM
        Version: 10
     Row_format: Fixed
           Rows: 1696
 Avg_row_length: 37
    Data_length: 62752
Max_data_length: 10414574138294271
   Index_length: 48128
      Data_free: 0
 Auto_increment: NULL
    Create_time: 2010-12-29 09:34:21
    Update_time: 2010-12-29 09:34:21
     Check_time: 2010-12-29 09:34:21
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 10. row ***************************
           Name: biblio_field_type_data
         Engine: MyISAM
        Version: 10
     Row_format: Dynamic
           Rows: 170
 Avg_row_length: 25
    Data_length: 4340
Max_data_length: 281474976710655
   Index_length: 4096
      Data_free: 0
 Auto_increment: NULL
    Create_time: 2010-12-29 09:34:21
    Update_time: 2010-12-29 09:34:21
     Check_time: NULL
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 11. row ***************************
           Name: biblio_fields
         Engine: MyISAM
        Version: 10
     Row_format: Dynamic
           Rows: 53
 Avg_row_length: 45
    Data_length: 2412
Max_data_length: 281474976710655
   Index_length: 2048
      Data_free: 0
 Auto_increment: NULL
    Create_time: 2010-12-29 09:34:21
    Update_time: 2010-12-29 09:34:21
     Check_time: NULL
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 12. row ***************************
           Name: biblio_import_cache
         Engine: MyISAM
        Version: 10
     Row_format: Dynamic
           Rows: 0
 Avg_row_length: 0
    Data_length: 324332
Max_data_length: 281474976710655
   Index_length: 4096
      Data_free: 324332
 Auto_increment: 2453
    Create_time: 2010-12-29 09:34:21
    Update_time: 2011-10-28 14:37:48
     Check_time: NULL
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 13. row ***************************
           Name: biblio_keyword
         Engine: MyISAM
        Version: 10
     Row_format: Fixed
           Rows: 6549
 Avg_row_length: 13
    Data_length: 85137
Max_data_length: 3659174697238527
   Index_length: 264192
      Data_free: 0
 Auto_increment: NULL
    Create_time: 2010-12-29 09:34:21
    Update_time: 2011-11-22 13:53:14
     Check_time: 2010-12-29 09:34:21
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 14. row ***************************
           Name: biblio_keyword_data
         Engine: MyISAM
        Version: 10
     Row_format: Dynamic
           Rows: 2299
 Avg_row_length: 74
    Data_length: 172276
Max_data_length: 281474976710655
   Index_length: 242688
      Data_free: 0
 Auto_increment: 2300
    Create_time: 2010-12-29 09:34:21
    Update_time: 2011-11-01 14:38:42
     Check_time: 2010-12-29 09:34:21
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 15. row ***************************
           Name: biblio_type_maps
         Engine: MyISAM
        Version: 10
     Row_format: Dynamic
           Rows: 0
 Avg_row_length: 0
    Data_length: 0
Max_data_length: 281474976710655
   Index_length: 1024
      Data_free: 0
 Auto_increment: NULL
    Create_time: 2010-12-29 09:34:21
    Update_time: 2010-12-29 09:34:21
     Check_time: NULL
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 16. row ***************************
           Name: biblio_types
         Engine: MyISAM
        Version: 10
     Row_format: Dynamic
           Rows: 32
 Avg_row_length: 30
    Data_length: 976
Max_data_length: 281474976710655
   Index_length: 2048
      Data_free: 0
 Auto_increment: NULL
    Create_time: 2010-12-29 09:34:22
    Update_time: 2010-12-29 09:34:22
     Check_time: NULL
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: 
*************************** 17. row ***************************
           Name: content_type_biblio
         Engine: InnoDB
        Version: 10
     Row_format: Compact
           Rows: 699
 Avg_row_length: 70
    Data_length: 49152
Max_data_length: 0
   Index_length: 16384
      Data_free: 0
 Auto_increment: NULL
    Create_time: 2011-01-28 17:03:30
    Update_time: NULL
     Check_time: NULL
      Collation: utf8_general_ci
       Checksum: NULL
 Create_options: 
        Comment: InnoDB free: 328704 kB
17 rows in set (0.00 sec)
rjerome’s picture

Thanks, the DB collation looks good. It would be good if you could confirm/deny that the problematic entries came from a file import, that might narrow it down a bit. If they did come from a file, then if would help if I could get a copy of that file (contact me via my contact form to get my email address).

Ron.

liam morland’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

This version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.