English-only journal on Swedish-primary site requires given names in Swedish when adding reviewers

Describe the issue or problem

We have a multi-language site with Swedish as primary language. In OJS 3.5.0-5 our English-only journals are required to enter given name for both English and Swedish when creating a new reviewer in the “Add reviewer” window. Expected behaviour would be to only require English, as Swedish is not even enabled in the journal.

The English field is the only one that has a red asterisk, but when trying to save it gives an error message: “A given name is required (Swedish)”

Appears to be specific to Add reviewer-window, in other places it works as expected.

Steps I took leading up to the issue

  1. Have multi-language site with Swedish set as primary language.

2. Have single-language journal in said site, set to only English.

3. Go to a submission, add reviewer, create reviewer.

4. Enter given name in only English and save.

What application are you using?
OJS 3.5.0-5

Hello @mannemark I will look into your specific issue and if I can reproduce I will make a ticket to capture the problem with Reviewer Form required fields. We have had some ongoing issues when it comes to site locale being out of sync with primary locales for legacy form pages. These legacy pages were planned for a rework so it might be part of a bigger task.

There have been a few fixes for these scenarios and it looks like you are on version 3.5.0-5 so they should be there. I will check to see if the fixes may have impacted the reviewer form as a result.

In particular I’m thinking about these tickets which were more for invitations but provide some general fixes as well:

https://github.com/pkp/pkp-lib/issues/12513

https://github.com/pkp/pkp-lib/issues/12540

They were attempting to fix these which haven’t been resolved fully yet:

https://github.com/pkp/pkp-lib/issues/12537

https://github.com/pkp/pkp-lib/issues/6291

https://github.com/pkp/pkp-lib/issues/5136

@mannemark As a follow up I was able to reproduce the problem and have found a similar issue with 3.3 so I don’t believe anything has regressed. As a point of clarity, are you able to create the reviewer once you fill in the entries for the missing field validations in the Primary Site locales or do those Primary site locals not show and you are unable to create a new reviewer?

I found that if I fill in the Primary locale as the warning suggests I was able to successfully create the new reviewer.

Hello @grierb ! Thanks for looking into this.

I understand that it is an ongoing issue. I even commented on this one, apparently: OJS 3.1.2 in localized author names the site default locale is required even if the journal does not use it · Issue #5136 · pkp/pkp-lib · GitHub.

As for your question, it looks almost exactly like your example in our case. The primary site locale does show up, without asterisk.It also says “this field is required” on the English field, but not on the Swedish. Yet, as I said, it gives a validation error when trying to save. Once both English and Swedish are entered, I can create the reviewer, yes.

Thanks for clarifying @mannemark . I can see the problem and does seem annoying. I thought it was blocking from adding any reviewer/user and was caused by some changes in 3.5.0-4, but looks like it has existed for a while. I believe once those open tickets are fixed it should resolve your case as well.

For some acceptance criteria I can add something like this to the ticket (#12537) to make sure it gets specific attention.

  1. For reviewer form (create new reviewer) only the Journal locale should be required and throw a validation.
  2. For Admin > User > Add User form only the Journal locale should be required and throw a validation.

Note: I still think that the field option for Site Locale should exist as there are some expectations around this and might cause downstream issues.

Thank you very much @grierb! The two points you suggest sums it up very well.

If it is absolutely needed then site locale fields showing up is not a huge problem imo, as long as they are not mandatory, especially not “secretly” mandatory as is the case at the moment.