Bug 3796 - Creating a New Section fails when "None/ Free From Review" Review Form is chosen
Creating a New Section fails when "None/ Free From Review" Review Form is chosen
Status: RESOLVED DUPLICATE of bug 3790
Product: OJS
Classification: Unclassified
Component: Journal Management
2.2.2
PC Windows Server 2003
: P3 normal
Assigned To: PKP Support
http://www.equinoxjournals.com/ojs/in...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-02 03:45 PDT by Michael Willis
Modified: 2008-10-02 09:08 PDT (History)
1 user (show)

See Also:
Version Reported In:
Also Affects:


Attachments
diff file which corrects problem in bug 3790 but DOES allow section editors to be added in create phase. (2.08 KB, patch)
2008-10-02 08:35 PDT, Michael Willis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Willis 2008-10-02 03:45:34 PDT
From Journal Management --> Journal Section --> Create Section

If no Review Form is chosen then, clicking Save will cause a database error on Windows version of MySQL.  This is because it is attempting to insert an empty string into the 'review_form_id' database column on the sections table.  If no review form is chosen it should insert a null.  I fixed the code on our site by adding the following at lines 214:

Old code (Line 214)
   $section->setReviewFormId($this->getData('reviewFormId'));

New code:
if ($this->getData('reviewFormId') != '') {
   $section->setReviewFormId($this->getData('reviewFormId'));
} else {
   $section->setReviewFormId(null);
}

I'm sure there are better ways of doing this but its done the trick for us.

Thanks

Mick
Equinox Journals
Science Registry
Comment 1 Michael Willis 2008-10-02 03:47:22 PDT
My apologies, should have also mentioned that the PHP file changed was SectionForm.inc.php in classes/manager/form
Comment 2 Alec Smecher 2008-10-02 08:06:18 PDT

*** This bug has been marked as a duplicate of bug 3790 ***
Comment 3 Michael Willis 2008-10-02 08:35:00 PDT
Created attachment 999 [details]
diff file which corrects problem in bug 3790 but DOES allow section editors to be added in create phase.

My only thoughts were that it would be good to keep the section editors available during the creation of a journal section.  I did this by always initialising the 'unassignedEditors' information.  I have included a diff file for inspection.
Comment 4 Alec Smecher 2008-10-02 09:08:15 PDT
Good point, Michael -- I've moved that change over to bug #3790 and committed it there. Thanks - Alec

*** This bug has been marked as a duplicate of bug 3790 ***