Upgrading from 3.1.1-4 to 3.2.0-3: Data too long for column

Hi,
OJS 3.1.1-4 to 3.2.0-3
Involves also moving to new server

I’m doing a Full Package test upgrade in a new server. Downloaded and decompressed the 3.2.0-3, keeping files, config and public, brought from current live server.

I synchronized configs and set installed to off.
Accessed to url anf filled in data required and executed the intallation script (web).
Firstly I got a permissions issue in my files directory, which I solved.

But then, when executing the installation script (web) again what I got is the following error:

A database error has happened: Data too long for column 'comments' at row 1056

How could I solve this?
Thanks in advance for your reply.

Regards,
Juan

Hi @jascanio,

I don’t think the column types changed for contents involving the comments column, so the likeliest thing that happened is an unintentional character set configuration change. Make sure that your config.inc.php is the same with respect to character set configuration on both installations, and that your target database has a default character set supporting UTF-8.

(This is assuming that you haven’t extended the data types manually in your old installation.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
Thanks for your reply.
I have solved the Data too long for column comments issue.

I am advancing through the upgrade process. (Full Package, web-based DB upgrade)

A couple of questions and issues:

a) To start the database upgrade process I’m required to insert admin credentials, together with some other details. I undersatand these need to be the current admin credentials. However, if I insert current admin credentials, the process will report errors with message “admin already exists”, or so. So I inserted a new non-existing admin credentials, which enabled the process to continue. Is this the way to go to upgrade or am I doing something wrong?

b) If I insert a new admin credentials the upgrade script seemed to progress further but I got the following on-screen message Duplicate entry '0-3' for key 'citations_publication_seq'

I found this topic at

I deleted from citations and then php lib/pkp/tools/parseCitations.php all

…and started from scratch again.

c) Having proceeded as stated in a) and b) it appears the process has fairly successfully concluded, but, when accessing Submissions from Admin area I get the following message:

Fatal error: Uncaught Error: Call to a member function getData() on null in /var/www/html/(journalname)/lib/pkp/classes/submission/PKPSubmission.inc.php:54

Stack trace: #0 /var/www/html/(journalname)/classes/services/SubmissionService.inc.php(134): PKPSubmission->getBestId() #1 /var/www/html/(journalname)/lib/pkp/classes/plugins/HookRegistry.inc.php(107): APP\Services\SubmissionService->modifyPropertyValues('Submission::get...', Array) #2 /var/www/html/(journalname)/lib/pkp/classes/services/PKPSubmissionService.inc.php(254): HookRegistry::call('Submission::get...', Array) #3 /var/www/html/(journalname)/lib/pkp/classes/services/PKPSubmissionService.inc.php(297): PKP\Services\PKPSubmissionService->getProperties(Object(Submission), Array, Array) #4 /var/www/html/(journalname)/lib/pkp/classes/components/listPanels/PKPSubmissionsListPanel.inc.php(186): PKP\Services\PKPSubmissionService->getBackendListProperties(Object(Submission), Array) #5 /var/www/html/(journalname)/lib/pkp/pages/dashboard/DashboardHandler.inc.php(76): PKP\components\listPanels\PKPSubmissionsListPanel->getItems(O in /var/www/html/(journalname)/lib/pkp/classes/submission/PKPSubmission.inc.php on line 54

Any help will be deeply appreciated.

Thanks in advance for your reply.

Regards,
Juan

Hi @jascanio,

To start the database upgrade process I’m required to insert admin credentials

That shouldn’t be the case… Are you trying to execute the installation form?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
Thanks for your reply
I have finally tried a command-line upgrade.
The process stops when the update citations query starts

UPDATE citations as c
                       SET c.publication_id = (
                               SELECT s.current_publication_id
                               FROM submissions as s
                               LEFT JOIN temp_citations as tc
                                       ON s.submission_id = tc.submission_id
                               WHERE c.citation_id = tc.citation_id
                       ) ORDER BY c.publication_id ASC
                       UPDATE citations as c
                       SET c.publication_id = (
                               SELECT s.current_publication_id
                               FROM submissions as s
                               LEFT JOIN temp_citations as tc
                                       ON s.submission_id = tc.submission_id
                               WHERE c.citation_id = tc.citation_id
                       ) ORDER BY c.publication_id ASC

No message obtained after molre than some minutes.

Just in case it is of any relevance, my config has persistent connections = off

Thanks in advance for any advice.

Regards,
Juan

Hi @jascanio,

That query legitimately takes a long time. You can improve its performance by adding an index; see Upgrade process performs slowly · Issue #5703 · pkp/pkp-lib · GitHub for some SQL statements that you can add.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
Ok. I’ll try.
Thanks
Regards,
Juan

Hi @asmecher,
We finally ran the query as is (without indexes). Waiting longer was enough.
We are now on OJS 3.2.0-3, and testing before moving to live.
Thanks for your help!
Regards,
Juan

1 Like