pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
297 stars 442 forks source link

OMP does not allow submissions if a press has no active series #10195

Closed mooselybased closed 3 weeks ago

mooselybased commented 1 month ago

Describe the bug When making a new submission in OMP, it will immediately boot you to a "Not allowed" message in the frontend of the press unless you have at least one active series in the press. This is unrelated to the general "allow submissions to be made to this press" setting in the Workflow section. This was definitely not the case with 3.3 as several of our presses don't have series and we used to be able to submit to them just fine.

Furthermore, if I try to create and then hide a dummy series to circumvent this bug, OMP will also not allow me to hide or delete the series unless another one is present, meaning I'm forced to keep a series I don't want and remove the series section from the browse block display to at least get it out of the frontend. This has me unsure if this is one or two bugs, so to be clear, the issues I'm having:

  1. Can't submit to a press unless it has at least one series
  2. Can't delete or hide a series unless at least one other series is active

The fact that issue 2 has a dedicated error message (see below) makes me think this is on purpose, but I can't imagine what benefit there is to forcing a series.

To Reproduce Steps to reproduce the behavior:

  1. Make sure your press can be submitted to (Workflow>Submissions)
  2. Make sure you don't have any series associated with your press (Press>Series>
  3. Make a new submission
  4. OMP will throw you to the frontend telling you submission are not allowed

Also:

  1. Attempt to delete or hide a series when no other series exists

What application are you using? OMP 3.4.05.

Additional information grafik grafik grafik

Also: grafik

kaitlinnewson commented 1 month ago

Hi @mooselybased, I'm testing this in the latest stable branches of 3.3 and 3.4, and in both versions I'm not able to make a submission until I create a series in the press, and can also not delete or deactivate that series once it is created. Is it possible it was an earlier version where you saw the different behaviour?

One difference I did notice is that in 3.3, in the submission process selecting a series is optional, but in 3.4 it has become required. I'm investigating whether this change was intended and will follow up with a PR if it wasn't.

mooselybased commented 1 month ago

Hi @kaitlinnewson, thanks for looking into this!

We updated from OMP 3.3.0.15 to 3.4.0.5, so I can't speak for the .16 or .17 branches of 3.3 or the earlier branches of 3.4. I suppose it's possible something was changed for 16/17 that was also implemented in the newest 3.4 branches.

I'm absolutely positive I was able to make submissions to 3.3.0.15 without any series in a press though. We updated to .15 in September 2023 and have several publications in no-series-presses that were submitted and published using 3.3 in 2024. I don't know if it was possible to delete or deactive series in 3.3.0.15 since I had no reason to try.

I can't agree with you on the part of 3.4 requiring you to select a series when making a new submission. I retried it just now to be sure and the only mandatory parts during submission are a title and at least one file.

kaitlinnewson commented 1 month ago

Yes I see that you're right, my mistake - it's not required to select a series, but because it's using radio buttons it's not easy to deselect it, which is a separate issue.

kaitlinnewson commented 1 month ago

After some investigating, it looks like this may have been introduced in work done to add the ability to disable submissions in OJS & OMP, and the logic for "Sections" in OJS has been used for "Series" in OMP (where in OJS a journal must have a section). I'll work on a fix for this so that the Series is optional throughout OMP.

kaitlinnewson commented 1 month ago

@asmecher PR ready for review:

This PR allows submissions when there is no active series, and allows for deletion and deactivation of a series when there is only one series.

In the PR I implemented submissions.tpl for OMP because the template in lib/pkp checks the count of sections. Another option could be removing that check in lib/pkp as it's difficult for journals to get to a state of having no section, and when a user tries to make a submission in OJS they are still blocked when no sections exist at the next step in the workflow.

jonasraoni commented 1 month ago

Hey @kaitlinnewson, I guess you're handling this issue https://github.com/pkp/pkp-lib/issues/9443 here, right? If yes, I'll close it.

kaitlinnewson commented 1 month ago

Hi @jonasraoni, I can take care of #9443 when I forward-port to 3.4/main.

asmecher commented 4 weeks ago

Merged https://github.com/pkp/omp/pull/1647, thanks -- I couldn't think of a better way to do this for stable-3_3_0 than by duplicating the template file. But this approach will have the least negative impact on themes, and I couldn't think of a better way. @kaitlinnewson, would you like to handle the forward-porting in the other issue, or here?

kaitlinnewson commented 3 weeks ago

@asmecher I'll forward-port in this issue and will work on #9443 as part of this as well.

kaitlinnewson commented 3 weeks ago

@asmecher Forward ported PRs added above and ready for review. I've opted to investigate #9443 separately in the interest of getting this issue resolved sooner, but am moving onto that next.

asmecher commented 3 weeks ago

Thanks, @kaitlinnewson, all merged! I think this completes this issue.