ERROR: Upgrade failed: DB: Data too long for column 'url_path' at row 2

Hello all,

I have been trying to upgrade our OJS 3.1.2-4 on Redhat7 Php 7.2.24 to OJS 3.2.1-4 . A few times the upgrade script ran into errors, but I was able to find solutions in this forum, fixed the error as suggested, and re-run the upgrade again - no problem. But this time I got a new error, and I can not find solution any where so I hope you can point me or give suggestion of what to do to overcome this error so that I an continue the upgrade.

Error:

“ERROR: Upgrade failed: DB: Data too long for column ‘url_path’ at row 2”

In context:

image

The closest post that I can find to help me understanding this error is below url, but I cannot still come up with a solution.

I hope you can help.

Best regards,

Dung.

Hi Dung,

So, the url_path field in the various tables that have it is a maximum of 64 characters long. You’ll need to look in publication_settings, issue_settings, issue_galley_settings, and publication_galley_settings and find values where setting_name is pub-id::publisher-id and the length of the setting_value field for that record is longer than 64 characters. If you find any, you’ll probably have to adjust those by hand and shorten them.

Best,
Jason

Hello Jason,

After some web searching I have found this post [OMP] Error upgrading from version 3.1.2-4 to 3.2.0 · Issue #5583 · pkp/pkp-lib · GitHub

Where @NateWr already wrote the queries for me :slight_smile: my lucky day. After running the queries I have found 8 records in table “submission_galley_settings” and curated their values to less than 64 chars.

I want to note that NateWr’s query has a typo LEN instead of LENGTH such as:

SELECT galley_id FROM submission_galley_settings WHERE setting_name=“pub-id::publisher-id” AND length(setting_value) > 64;

I am now back to restoring database and re-running upgrade script, it will take a bit of time, I will post back if this fix will solve the issue before we close this ticket.

Thank you all for your works.

Dung.

1 Like

Good Morning @jnugent

I can now confirm the issue is resolved (the upgrade script has passed that point successfully)

below is context

image

Please close this ticket, and thank you for your time!

Best,

Dung.

Hi @dung, glad to hear it!