We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 8169

Summary: Problems with quick submit plugin running nultilanguage OJS instance
Product: OJS Reporter: Garant <01garant>
Component: Import/ExportAssignee: PKP Support <pkp-support>
Severity: normal CC: alec, michael.thessel
Priority: P3    
Version: 2.4.3   
Hardware: All   
OS: All   
Version Reported In: 2.3.7, 2.3.8 Also Affects:
Attachments: Error Message

Description Garant 2013-03-18 01:28:19 PDT
The problem is described here: http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=7593#p37856
Also I've described how to reproduce this event
Comment 1 Michael Thessel 2013-03-22 10:08:00 PDT
I looked into that, but having trouble reproducing the issue. What I did so far:

* Set up 2 journals
* Set up 1 issue for each journal
* Set up 2 languages
* Set up those languages as ui, submission and form languages

When I now try to submit a article in a language other than English I get the following errors:

"Please enter the title of your article. (English)" and 
"Please enter the abstract of your article. (English)"

When I then switch back to English, fill those fields and submit the article everything works fine.

I'm running 2.4.1 and not  2.3.4 as the bug report states. Could it be that this has been addressed since? Is there anything wrong with my workflow?
Comment 2 Alec Smecher 2013-03-22 10:14:50 PDT
Michael, Garant is running OJS 2.3.8; we tend to file bugs against the version they are to be fixed in. (Odd, but helpful for our release planning workflow.) In this case the fix will go into 2.4.3.

I'd suggest setting up a 2.3.8 install to see if the issue is different; if you can reproduce it there but not in 2.4.2 then it's a WONTFIX -- the 2.3.x line isn't going to see any more releases unless there's a major security issue.
Comment 3 Michael Thessel 2013-03-25 10:19:04 PDT
Created attachment 3922 [details]
Error Message
Comment 4 Michael Thessel 2013-03-25 10:22:45 PDT
I installed OJS version 2.3.8 and could reproduce the error there.

[Thu Mar 21 18:53:04 2013] [error] [client] PHP Fatal error:  Call to a member function getFileId() on a non-object in /src/ojs-2.3.8/classes/submission/editor/EditorAction.inc.php on line 124, referer: http://ojs_stable.vm/index.php/journal1/manager/importexport/plugin/QuickSubmitPlugin

Steps to reproduce:
* Set up journal with 2 languages
* Set up those languages as ui, submission and form languages
* Load quick submit plugin and select language other than default language
* Fill all required fields and upload file
* Submit
* 2 error messages will appear (default language's title and abstract are missing)
* Switch to default language, fill abstract and title
* Submit

This error doesn't happen in the latest development version.

What is strange though, is that you have to fill the abstract and title for the default language. I'm not sure if this is intended. Even if it would be the UI for this is not intuitive. The problem is that in 2.3.8 as well as in 2.4.1, when you don't fill the title and abstract for the default language you will be presented with the error messages mentioned above but the title and abstract fields highlighted are the ones for the selected language. So you get fields marked as containing errors which are actually filled correctly. See attached screenshot.
Comment 5 Alec Smecher 2013-03-25 10:26:06 PDT
Michael, thanks for investigating -- I'm content to mark this a WONTFIX, as the original report doesn't apply to the 2.4.x line. (The 2.3.x line only gets security bugfixes at this point.) The multilingual input tools have been vastly improved in the master branch (for release in OJS 3.0) so I don't think the quirks here are worth fixing.

Garant, I'd suggest upgrading to a 2.4.x release.
Comment 6 Garant 2013-03-25 11:19:47 PDT
Hi, Alec!
Thank you for you advice.
Just wondering, the 2.4.x is a development branch? I mean does it suit for a production server?
Comment 7 Garant 2013-03-25 11:20:28 PDT
Michael, thank you for you help!
Comment 8 Alec Smecher 2013-03-25 11:23:14 PDT
Garant, good question. When we release a new major line (e.g. 2.2.0, 2.3.0, 2.4.0) we will typically have to release a couple of follow-up releases before it becomes stable. For 2.4.x, our candidate is 2.4.2; we released that about 3 weeks ago and only have a few minor issues patched so far (see http://pkp.sfu.ca/wiki/index.php/OJS_2.4.2_Recommended_Patches for a list). I'll be speaking with the team about designating OJS 2.4.2 "stable" later this week, but can't think of any impediments to that. So you're safe to proceed with 2.4.2 and we should be designating it "stable" very soon.
Comment 9 Garant 2013-03-25 11:40:18 PDT
Alec, thank you!
Comment 10 Alec Smecher 2013-06-10 11:39:59 PDT
On further investigation, this does appear to be a problem in 2.4.x. The QuickSubmit plugin does support multiple file uploads for different locales, but if an upload for the primary locale is not included, then a fatal error will occur. Try e.g.:

Primary Locale English; also supports French
- Go to QuickSubmit plugin
- Enter metadata
- Change locale to French
- Upload a file
- Submit the article

...you'll get (OJS 2.4.2)...

[Thu Mar 21 18:53:04 2013] [error] [client] PHP Fatal error:  Call to a member function getFileId() on a non-object in /src/ojs-2.3.8/classes/submission/editor/EditorAction.inc.php on line 123

Comment 11 Alec Smecher 2013-06-10 11:40:02 PDT
Fixed behavior without primary locale included in file uploads
Comment 12 Alec Smecher 2013-06-10 11:40:02 PDT
Fixed behavior without primary locale included in file uploads