Skip to content
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

[OJS/OMP] quickSubmit Plugin - switching submission language not working since 3.2.x #6773

Closed
nils-stefan-weiher opened this issue Feb 19, 2021 · 7 comments
Labels
Bug:1:Low A bug that does not have a severe consequence or affects a small number of users.

Comments

@nils-stefan-weiher
Copy link

Describe the bug
Hi everyone,

a co-worker had problems with using the quicksubmit Plugin for adding submissions with different locales than the default journal locale.

When using the QuickSubmit Plugin:
It seems the switch of the submission language does not propagate to the publication object, so the AuthorGridHandler for the contributors grid still operates on the initial language set, which is saved when the QuickSubmitForm first creates a Submission and Publication object and saves to the database. This is still an issue in the 3.3 version of the plugin (main Branch).

Initial locale of the publication is set here:
https://github.com/pkp/quickSubmit/blob/main/QuickSubmitForm.inc.php#L229-L237

When switching the submission language in the form, the form is reloaded but no new submission or publication is created. Instead the submission language is updated here, but not for the publication:
https://github.com/pkp/quickSubmit/blob/main/QuickSubmitForm.inc.php#L52-L60

But Submission::setLocale is deprecated since 3.2, and only publication locale is used as default/required locale for the AuthorForm:
https://github.com/pkp/pkp-lib/blob/main/controllers/grid/users/author/form/PKPAuthorForm.inc.php#L34

This means you can't add a submission with a different locale other than the journal/press default using the quickSubmit Plugin. And becaue you cant see the locale of the submission after the submit, the issues with the metadata wont be obvious.

To Reproduce
Steps to reproduce the behavior (for a journal/press with at least two submission locales enabled):

  1. Go to import/export 'QuickSubmit' in the dashboard
  2. Switch submission language, the form reloads.
  3. Scroll down to 'Contributors'
  4. Click 'Add a Contributor'
  5. See that the form still requires input for the fields from the default language at not for the language selected in quick submit

What application are you using?
Tested in OJS 3.2.1-4 but should be in any version after 3.2.0 of OJS/OMP

Additional information
@NateWr @asmecher , this is related to #5502 , because you cant change the publication locale at the moment after submitting.

Thanks for your hard work in maintaining this codebase!

@nils-stefan-weiher
Copy link
Author

nils-stefan-weiher commented Mar 12, 2021

Hi everyone,

PR openend for Branch stable-3_2_1: pkp/quickSubmit#52

Best regards,

Nils

@nils-stefan-weiher
Copy link
Author

And for main Branch: pkp/quickSubmit#53

@NateWr
Copy link
Contributor

NateWr commented Mar 15, 2021

Thanks @isgrim, this looks good to me. We'll also need a PR to the stable-3_3_0 branch. @asmecher can you double-check it? I'm not too familiar with QuickSubmit.

@asmecher I notice that the QuickSubmit plugin sets the language property automatically (here). But this is optional metadata (see #5000) that probably shouldn't be set automatically. Should this part of QuickSubmit be removed? I suspect it is putting a lot of hidden data into the system...

@asmecher
Copy link
Member

@NateWr, yes, please remove that line of code; it's not required and shouldn't be there.

@nils-stefan-weiher
Copy link
Author

PR for stable_3-3-0: pkp/quickSubmit#54

NateWr added a commit to pkp/quickSubmit that referenced this issue Mar 16, 2021
NateWr added a commit to pkp/quickSubmit that referenced this issue Mar 16, 2021
@NateWr
Copy link
Contributor

NateWr commented Mar 16, 2021

Thanks @isgrim! I've merged those PRs so the fix is in stable-3_2_1, stable-3_3_0 and main.

@asmecher I removed the offending language line from main but left it in for stable-3_3_0 to minimize unexpected changes in stable versions. Is that alright or should I backport to stable-3_3_0?

@asmecher
Copy link
Member

@NateWr, it's pretty minor -- I'm OK either way. This metadata field will be re-evaluated with #5000.

@NateWr NateWr added this to the OJS/OMP/OPS 3.3.0-4 milestone Mar 17, 2021
@NateWr NateWr closed this as completed Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug:1:Low A bug that does not have a severe consequence or affects a small number of users.
Projects
None yet
Development

No branches or pull requests

3 participants