[OJS 3.0.2] Form freezes when uploading a galley with a certain name

Hi! One of our users had the following issue: when she tried to upload a galley with a certain name (regardless of its format) in the Quick Submit form, the form froze like this:

The ‘Save’ button was greyed out, tabs could not be opened, only the ‘Cancel’ button was available. The ‘spell’ (filename) was this:
“Шариков Генезис полидисциплинарного коммуникативного метадискурса КПУБЛ”

Hi @Ph_We,

Have you checked your PHP error log?

Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

The problem is when authors use not English language (Ukrainian in our case) while uploading the file, they can not upload file, like @Ph_We described. Continue button stays inactive, except they type another file name in English.

This certainly is not an error, this is something that coded in OJS. And it is very frustrating for authors.

To be more precise:

File name include fields on primary and secondary languages. Filling out primary language field is mandatory upon file uploading, even when user uses secondary language interface. So there is a need in this case (for making continue button active) press on file name field, choose primary language field and enter there something. Our new users often give up on this stage, because they do not know what happens and why they can not move to the next stage.

Hi @Vitaliy,

When I tried to reproduce that behavior, I tested files with parts of that name:

Генезис полидисциплинарного коммуникативного метадискурса

None of those filenames caused this. So I could not even trace it anyhow :slight_smile:
So I’m not sure it’s connected to non-English languages directly…

Hi @Vitaliy

I have noticed the same and made an issue about in Github: [OJS] Localised filenames complicate uploading submission files in multilingual journals · Issue #2114 · pkp/pkp-lib · GitHub

This is actually something I am working on right now. I can give you very fast fix for this which removes localisation from that field and only leaves the primary locale there. After this the problem is resolved. However, @asmecher was not too keen to remove the localisation. I have tried to change the logic there so that the field that is automatically filled with the file name is always the primary locale, but have not succeeded yet. Hopefully soon when I have time to look into this again.

edit: forgot to mention, that I think that the problem @Ph_We had in the first post is actually a separate issue, while this issue happens in the second stage of file upload.

1 Like

Hi @asmecher,

Yes, this appears to be relevant:

[Fri Feb 17 15:08:28.863042 2017] [:error] [pid 13338] [client ...*:***] ojs2: DB Error: Data too long for column ‘original_file_name’ at row 1, referer: https://ojs.hse.ru/index.php/test1/management/importexport/plugin/QuickSubmitPlugin

The strange thing is the hypothesis of filename length being exceeded was the first I thought of. So I tried other names like
but that did not cause any error :thinking:

I wonder how the database actually saves those characters, they are probably two letters each in UTF-8 like ä, å and ö?

Hi @ajnyga,

That’s correct, accented characters will typically cost 2 bytes. (We use UTF-8.)

Alec Smecher
Public Knowledge Project Team