Citations fail if name has multiple commas

Created on 13 November 2024, 1 day ago

Problem/Motivation

Citations fail when an author's name contains more than one comma.

Steps to reproduce

Enter an author with multiple commas for example "Montgomery, Lucy Maud, 1874-1942." or any other name string from an authority that has multiple commas. The site I tested it on used a typed relation field to store names.

Note that the citations are not generated.

Error in the logs is

ADCI\FullNameParser\Exception\FlipStringException: Can't flip around multiple ',' characters in name string 'Arsenault, Georges, 1952-'. in ADCI\FullNameParser\Parser->flipStringPartsAround() (line 708 of /var/www/islandarchives2-2024-11-01/vendor/adci/full-name-parser/src/Parser.php).

Proposed resolution

Remove everything after the second comma before passing the name string to the FullNameParser.

Remaining tasks

User interface changes

none

API changes

none

Data model changes

none

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada rosiel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024