-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trailing comma in author name causes error #10776
Trailing comma in author name causes error #10776
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Thanks!
@@ -89,6 +89,7 @@ public void testName() { | |||
verifyIsPerson("kcjim11, kcjim11", "kcjim11", "kcjim11"); | |||
|
|||
verifyIsPerson("Bartholomew 3, James", "James", "Bartholomew 3"); | |||
verifyIsPerson("Smith, ", null, "Smith"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if there is no space at the end? Should you add that as another test case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verifying failed because the compared JsonObject was normalized via an util method. I added the normalization to the comparison in the assertion and added the other test case.
/push-image to allow for QA testing, thx |
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By applying this fix, I can add a name Schmidt,
and it doesn't break JSON-LD anymore when I hit "publish".
I also used Schmidt, Test,
as an example, stays unaffected. API output looks good, too. I verified that Schmidt,
leads to an Error 500 page on gdcc/dataverse:unstable
. Schmidt, Test,
was never affected.
What this PR does / why we need it:
Fixes a bug where a trailing comma in an author name leads to an error. Error occured to us in production recently, version 6.2.
Which issue(s) this PR closes:
Suggestions on how to test this:
See unit test or reproduce error by adding author name with trailing comma to dataset. Once dataset is published, error occurs on reload.
Is there a release notes update needed for this change?:
I added one just to be sure.