|
PKP Bugzilla – Full Text Bug Listing |
| Summary: | DB Error: Incorrect integer value: '' for column 'review_form_id' at row 1 | ||
|---|---|---|---|
| Product: | OJS | Reporter: | Fanrien <fanrien> |
| Component: | Journal Management | Assignee: | Alec Smecher <alec> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | dkaloper, fanrien, magonzalez, mikey.willis, pkp-support |
| Priority: | P1 | ||
| Version: | 2.2.3 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Version Reported In: | Also Affects: | ||
| Attachments: |
Patch against OJS 2.2.1
Patch against OJS 2.2.2 Additional patch against OJS 2.2.2 Patch |
||
|
Description
Fanrien
2008-09-26 03:26:17 PDT
Created attachment 987 [details]
Patch against OJS 2.2.1
Created attachment 988 [details]
Patch against OJS 2.2.2
Attached patch a) ensures that blank review form IDs are cast to null, and b) the section editor list is removed from the "create section" form (but available on "edit section"). *** Bug 3793 has been marked as a duplicate of this bug. *** WebServer2 htdocs # ls Bug3790patch classes config.TEMPLATE.inc.php docs includes js locale pages public rt templates cache config.inc.php dbscripts help index.php lib logo.jpg plugins registry styles tools WebServer2 htdocs # cat Bug3790patch diff -u -r1.37 SectionForm.inc.php --- classes/manager/form/SectionForm.inc.php 1 Jul 2008 01:16:10 -0000 1.37 +++ classes/manager/form/SectionForm.inc.php 26 Sep 2008 16:09:00 -0000 @@ -206,7 +206,9 @@ $section->setTitle($this->getData('title'), null); // Localized $section->setAbbrev($this->getData('abbrev'), null); // Localized - $section->setReviewFormId($this->getData('reviewFormId')); + $reviewFormId = $this->getData('reviewFormId'); + if ($reviewFormId === '') $reviewFormId = null; + $section->setReviewFormId($reviewFormId); $section->setMetaIndexed($this->getData('metaIndexed') ? 0 : 1); // #2066: Inverted $section->setMetaReviewed($this->getData('metaReviewed') ? 0 : 1); // #2066: Inverted $section->setAbstractsNotRequired($this->getData('abstractsNotRequired') ? 1 : 0); diff -u -r1.44 sectionForm.tpl --- templates/manager/sections/sectionForm.tpl 9 Jul 2008 02:45:40 -0000 1.44 +++ templates/manager/sections/sectionForm.tpl 26 Sep 2008 16:12:37 -0000 @@ -154,6 +154,8 @@ </tr> {/if} </table> + +{if $sectionId}{* Disable section editor selection if this is a new section *} <div class="separator"></div> <h3>{translate key="user.role.sectionEditors"}</h3> @@ -229,6 +231,8 @@ </tr> </table> +{/if}{* $sectionId *} + <p><input type="submit" value="{translate key="common.save"}" class="button defaultButton" /> <input type="button" value="{translate key="common.cancel"}" class="button" onclick="document.location.href='{url op="sections" escape=false}'" /></p> </form> WebServer2 htdocs # patch -p1 < Bug3790patch can't find file to patch at input line 4 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -u -r1.37 SectionForm.inc.php |--- classes/manager/form/SectionForm.inc.php 1 Jul 2008 01:16:10 -0000 1.37 |+++ classes/manager/form/SectionForm.inc.php 26 Sep 2008 16:09:00 -0000 -------------------------- File to patch: ================================================================ Dear all, why the patch program can't find the file? Path and version are exactly correct. Please advise. Try using -p0 instead of -p1. *** Bug 3796 has been marked as a duplicate of this bug. *** Created attachment 1002 [details]
Additional patch against OJS 2.2.2
*** Bug 3796 has been marked as a duplicate of this bug. *** Created attachment 1435 [details]
Patch
Rui, is this an additional fix? If so, could you send a unified diff (generated using "diff -u") instead of the complete modified file? |