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
306 stars 445 forks source link

[OJS3] Create new issue stalls when volume number is not an integer #2071

Closed mittinatten closed 5 years ago

mittinatten commented 7 years ago

When you create a new issue with a non-integer volume number in OJS 3.0.1 the interface stalls. There is an error message in the log, but the interface simply stalls with no indication of what went wrong. It seems like non-integer issue numbers work.

In our particular case an editor tried to use the volume number "1b" on a test server, don't know if this is important or just an experiment. But if it's simple to relax the integer-requirement on volume numbers it could be worth considering.

asmecher commented 7 years ago

@mittinatten, I'm open to the idea of relaxing the numeric requirement, but we'd need to survey the various third-party standards that field gets fed into in order to see whether they would have difficulty with non-numerics.

kaitlinnewson commented 5 years ago

Hi all, We ran into this issue recently as well (in version 3.1.2). A user had entered text characters into the "Volume" field and saw a spinning icon with no error message, although there was an error message in the logs. Adding some text about the field requirements would be helpful in this case so the user knows why it isn't creating the issue.

asmecher commented 5 years ago

@kaitlinnewson, what was the error in the logs? What DBMS are you using (PostgreSQL or MySQL)?

kaitlinnewson commented 5 years ago

@asmecher We use MySQL. This was the error message:

ojs2: DB Error: Incorrect integer value: 'ictea 2019' for column 'volume' at row 1, referer: https://journals.library.ryerson.ca/index.php/ictea/manageIssues

asmecher commented 5 years ago

@kaitlinnewson, can you try the attached patch and confirm whether it resolves the issue? If so, I'll port it to stable-3_1_2 for the forthcoming OJS 3.1.2-1 release.

kaitlinnewson commented 5 years ago

@asmecher Looks good now, and displays an error message as expected.

asmecher commented 5 years ago

Great, thanks, @kaitlinnewson -- committed for OJS 3.1.2-1.