Bug 3219 - Blank public IDs saved as empty strings rather than NULLs
Blank public IDs saved as empty strings rather than NULLs
Status: RESOLVED FIXED
Product: OJS
Classification: Unclassified
Component: Editors
2.2.1
PC Linux
: P1 normal
Assigned To: PKP Support
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-11 12:14 PST by Alec Smecher
Modified: 2008-07-14 09:47 PDT (History)
0 users

See Also:
Version Reported In:
Also Affects:


Attachments
Patch against pre-2.2.1 CVS (2.80 KB, patch)
2008-01-11 12:29 PST, Alec Smecher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alec Smecher 2008-01-11 12:14:31 PST
Blank public IDs are saved as empty strings rather than NULL values; this causes indexing to run into duplicates. Should check for this in:

- Public article IDs
- Public issue IDs
- Public supp file IDs

Should also ensure that blanks are turned into nulls as part of the upgrade process.
Comment 1 Alec Smecher 2008-01-11 12:16:46 PST
To work around this for OJS 2.2, run the following queries before upgrading:

UPDATE issues SET public_issue_id = NULL WHERE public_issue_id = '';
UPDATE published_articles SET public_article_id = NULL WHERE public_article_id = '';
UPDATE article_supplementary_files SET public_supp_file_id = NULL WHERE public_supp_file_id = '';
Comment 2 Alec Smecher 2008-01-11 12:29:47 PST
Created attachment 459 [details]
Patch against pre-2.2.1 CVS
Comment 3 Alec Smecher 2008-01-11 12:30:05 PST
Fixed.