-
Notifications
You must be signed in to change notification settings - Fork 444
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
Add reviewer modal expanding reviewer details javascript error #6024
Comments
@procky I'm looking into this now but I'm unable to reproduce the issue. It looks like this was addressed as part of the 3.1.2-4 release: pkp/ui-library@1d17444 Specifically, it is this line https://github.com/pkp/ui-library/blob/master/src/components/ListPanel/users/SelectReviewerListItem.vue#L175-L180 where the biography is loaded and that I'd recommend trying with a newer release to see if this resolves your issue. |
@NateWr thank you for looking at it. Helped point me in the right direction. Disclosure: I am Procky but I am now using this GitHub account. I can reproduce this error with fresh installs of OJS and can now see the problem. We have users created from registration and they do not get given a biography in the user_settings table. We upgrade our OJS journal using the tar.gz files from https://pkp.sfu.ca/ojs/ojs_download/ and in the latest version (3.2.1-1) the localize function is:
From what I can tell this matches https://github.com/pkp/ui-library/blob/master/src/mixins/global.js#L104 From debugging build.js I can see the code does as expected. First localized call is for affiliation and the first param is an object with the locale affiliation string. The second call the param is null and is called for biography. It fails when checking the third if statement. Your localize function's null check looks good to solve this issue. |
👍 Good detective work, @awecancer aka Procky. It looks like this has changed between This is the function as it appears in 3.2.0 and 3.2.1, with the I'll file this to be fixed for our next 3.2.1.x release. If you're willing, we'd love to have a PR against the If you wanted to fix it in your local install by editing the build.js file directly, you can probably do it by changing:
To:
|
PR: Tests: |
Thanks @jnugent. Also while improbable anyone will need this, the direct change to the build.js file would be:
|
Submodule update for pkp/pkp-lib#6024 localization fix in reviewer list panel
Thanks everyone, that's been merged to the |
In the modal when you click the expand arrow for more details on a reviewer nothing happens and an error appears in the console.
Javascript Error
TypeError: "e is null"
in build.js
I have found in the data given to the smarty template if the biography for a reviewer is null it will fail but if it is an empty string or array of locales it works.
Error reproducible on our journal (OJS 3.2.0.1) and also tested using a fresh docker-ojs install.
Reproduce the behaviour:
The text was updated successfully, but these errors were encountered: