Problem/Motivation

When the data is normalized if a middle name is missing a given name has an extra space at the end. It causes double period in citation for some CSL. For example APA

Steps to reproduce

Add any reference with a contributor. Set APA as a default CSL. Render it as a citation.

Expected: Davoodi, T., & Lombrozo, T. (2022). Explaining the existential ...
Actual: Davoodi, T. ., & Lombrozo, T. . (2022). Explaining the existential ...

Issue fork bibcite-3340382

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

xopoc created an issue. See original summary.

a_khalipau’s picture

StatusFileSize
new2.07 KB
a_khalipau’s picture

StatusFileSize
new2.08 KB
a_khalipau’s picture

StatusFileSize
new2.09 KB
kpaxman’s picture

Status: Active » Needs review

I wasn't seeing this in the latest tag, but this seems to have been introduced with #2992234: Deprecated packages in dependencies which has been merged into dev for both 2.x and 3.x but only tagged against 3.x from what I can see.

This does fix the issue for me, but I'm not sure if the fix would affect anything else, so I'm setting this to needs review.

This may be a duplicate of #3385290: Trim given name

mark_fullmer’s picture

Version: 2.0.x-dev » 3.0.x-dev
mark_fullmer’s picture

Status: Needs review » Postponed (maintainer needs more info)

I attempted to reproduce this problem on the 3.0.x-dev branch today and was unable to do so. Steps taken:

1. Create a new Contributor at /admin/content/bibcite/contributor , entering a Middle Name and a Surname, but not a First Name.
2. Create a Reference and associate it with this Contributor.
3. Render this using the (default) APA style citation formatter provided by the module.
4. Observe that there is no duplicative "double period" as described in the issue report.

I also tried populating a whitespace character for the first name, and separately for the middle name.

If this is still a problem, please provide additional steps to reproduce. Also, if it is a problem, it might more appropriately be addressed in https://github.com/ADCI/full-name-parser, which is a dependency of this module.

istryker’s picture

I can confirm this is a problem in version 2.0.x and D9
I can confirm this is no longer a problem in version 3.0.x on D10

istryker’s picture

Version: 3.0.x-dev » 2.0.x-dev
Status: Postponed (maintainer needs more info) » Closed (won't fix)
benjifisher’s picture

Looking at the patch from #4, I am pretty sure that this issue was fixed (on the 3.0.x branch) in #3155552: Contributor with no first or middle name results in incorrect processing (e.g., APA format).

At least, the patch here has pretty much the same effect as the change from that issue. It is possible that the symptom of the problem changed from some earlier commit, especially since (Comment #7 here) the problem could not be reproduced on the 3.0.x branch in June, but the other issue was not fixed until July.