Error: Upgrade from 3.1.2-1 to 3.2.1-1

Hi @Darryl_Nuyda,

The citations_submission_seq sequence belongs to the citations table.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher;

Thanks for the reply. and Successfully Upgrade to 3.2.1-2 OJS. But, wait here is my way of doing! Because can not proceed with the Upgrade I decided to export the table of citations and bring them to empty. then UPGRADE is successful. then, I tried to refill/insert the data of the citations table and the Error is shown up #1062 - Duplicate entry ‘0-6’ for key ‘citations_submission_seq’.

Screenshot_18

Please help me to check the error?

Thanks for the Response,

Darryl

Hi @Darryl_Nuyda,

There’s a work-around you can use to re-generate the contents of the citations table; see [OJS2.4.8 to 3.1.2-3] XAMPP, How to Upgrade with upgrade.php - #30 by asmecher.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I follow this instruction;

and I got this error;

Screenshot_22

Thanks for the response;

Hi @Darryl_Nuyda,

I suspect you have some incompatible code mixed in with your OJS 3.2.1-x codebase. You can turn on the stack trace option in config.inc.php to get more information from OJS when it encounters an error.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher;

I am stock again on this Issue: Screenshot_28

Errors occurred during installation:

  • A database error has occurred: Table ‘pair2007_ojspubs.email_templates_data’ doesn’t exist

A step that I do:

  1. Full Package, ( 3.1.2-1 to 3.2.1-2)
  2. config.inc.php (client_charset = utf-8, connection_charset = utf8, database_charset = utf8, and charset_normalization = Off)
  3. dbscripts (3.2.0_preupdate_email_templates.xml, 3.2.0_update.xml, 3.2.0_versioning.xml)
  4. classes (install/upgrade.inc.php)
  5. DUMP my database and change to my backup!
  6. As I remembered my old backUp DB, was encountered an error but, proceed to Upgrade on 3.1.2-1 version (March 2019) I check the system information. but the error I forgot what is the error indicated.
  7. Tracing the 3.2.0 version for email_templates_data.

for now, here is my target to solve the CASE! try to check some of the issues on this forum and GitHub.

Thanks for the response
Darryl Nuyda

Hi @Darryl_Nuyda,

An OJS 3.1.2 database should definitely contain a table called email_templates_data; did you try to re-run an upgrade after a failure without first reloading your database from backup?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Yes, I re-run the upgrade 5 times without reloading my database backup but the error is the same.

I tried to install a new 3.2.1-2 to my localhost(XAMPP) to double-check if the email_templates_data table is there, but did not show up. I am trying to install it to my WHM Cpanel.

Thanks for the response.
Darryl Nuyda

Hi @Darryl_Nuyda,

If an upgrade fails, your database will be stuck somewhere between the old and new versions. You’ll definitely need to reload your database from backup before running the upgrade again.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Yes, I do this many times but the error is the same. maybe my backup was not the old once, cause my old backup was lost due to the late renewal of our hosting server, and all files deleted even the database! my backup right now is the 3.1.2-1(march 2019 without the email_templates_data upgraded but with error).

and, Now tracing the probable or the possibility of solving the Issues!

Thanks for the response,
Darryl Nuyda

Hi @asmecher;

I tried the OJS 3.2.1-2 to installed to our CPANEL and checking if the email_templates_data table is inside of the database when I find out no Table like email_templates_data. Please check the image below:

OJS 3.2.1-2: Screenshot_29 no Table email_templates_data found. but, when I tried to Upgrade. here is the result.

Upgrade result:

Screenshot_31


The situation on our publication website: when I double-check the database, the email_templates_data isn’t there see the image below:

Screenshot_30

but, I tried to Upgrade with a full package of OJS 3.2.1-1 from our site the result see below.

Screenshot_32

Errors occurred during installation:

  • A database error has occurred: Table ‘dbname.email_templates_data’ doesn’t exist

I don’t know what is the problem with this.

I need HELP for this,

Thank you for the response,
Darryl Nuyda

Hi @Darryl_Nuyda,

I think you’re comparing two different starting versions, which will have different upgrade steps and different expectations for database tables to exist or not.

If your production database is OJS 3.1.2-1, there should definitely be a email_templates_data table in it. If there is not, then it’s likely that someone has already attempted an upgrade to 3.2.x but failed. If that has happened, you’ll need to restore your 3.1.2-1 database from backup (so that an email_templates_data table is present) before trying again.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher;

I will try again, thanks for the explanation.

and I check the System Information of our OJS.

OJS--11 maybe I will start here.

Thanks for the response.

Darryl Nuyda

Hi @asmecher,

Here is my discovery from OJS-3.0.2, I saw the email_templates_data and dumping and insert it into the database of our publication. When I tried to I encounter this error.

Screenshot_42

and deleted to the email_templates_data table the ‘email_id’. and then re-run again, I encountered this error:

Screenshot_43.

Thanks for the response,

Darryl Nuyda

Hi @asmecher;

I got this error in the latest upgrade, can’t proceed:
Screenshot_44

I double-check these updates on dbscripts!

CREATE TABLE temp_authors AS SELECT * FROM authors CREATE INDEX temp_authors_s_id ON temp_authors (submission_id) CREATE INDEX temp_authors_a_s_id ON temp_authors (author_id, submission_id) CREATE TABLE temp_submissions AS SELECT * FROM submissions CREATE INDEX temp_submissions_s_id ON temp_submissions (submission_id) CREATE TABLE temp_submission_galleys AS SELECT * FROM submission_galleys CREATE INDEX temp_submission_galleys_s_id ON temp_submission_galleys (submission_id) CREATE TABLE temp_published_submissions AS SELECT * FROM published_submissions CREATE INDEX temp_published_submissions_s_id ON temp_published_submissions (submission_id) CREATE TABLE temp_citations AS SELECT * FROM citations CREATE INDEX temp_citations_s_id ON temp_citations (submission_id) CREATE INDEX temp_citations_c_s_id ON temp_citations (citation_id, submission_id) * dbscripts/xml/upgrade/3.2.0_preupdate_versioning.xml CREATE TABLE temp_last_activity_submissions AS SELECT * FROM submissions

dbscripts/xml/upgrade/3.2.0_preupdate_last_activity.xml

ALTER TABLE email_templates_data ADD email_id BIGINT
ALTER TABLE email_templates ADD context_id BIGINT
I commented this two cause always say Duplicate 0-01 and already exist!

  • dbscripts/xml/upgrade/3.2.0_preupdate_email_templates.xml

When I re-run the Upgrade the error that showed up is tem_authors is already exists.

Thanks for the response
Darryl Nuyda

Hi @Darryl_Nuyda,

It really sounds like you’re trying to recover a 3.1.2-1 database that was already partially upgraded to 3.2.1-x, i.e. the upgrade failed and was never restored from backup. Do you know what step of the upgrade failed during the first time the upgrade was executed?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher;

As I remembered encounter when I tried to Upgrade from 3.0.2.0 version to 3.1.2.1 beta version, I encounter error there s.y 2019, but the upgrade continues and to successfully upgraded with some errors, but I did not mind on that, on the part Upgrading was successfully and Now here is the problem, they can not proceed to upgrade due to the incorrect upgrade.

My processing of Upgrade is a Full Package. (public, config.inc.php, and files folder remain) the rest of the files will replace the new master/patch.

Can You help me with how to solve this?

Thanks for the response
Darryl

Hi @asmecher;

Thanks for the response,
Darryl M Nuyda

Hi @Darryl_Nuyda,

I’m afraid you’re in the same situation as this thread describes: DB Error: Unknown column 'primary_contact' in 'where clause - #15 by asmecher

I can’t walk you through this in detail – it’s time-consuming to fix remotely and I don’t know much about your database. I’d suggest getting familiar with the dbscripts/xml/upgrade.xml upgrade descriptor and working through it step by step.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher,

Due to this Error, All Plugins can not fully function, for Example in the import/export area in tools.

I Hope is everyone knows this problem.

Thanks for the Response;

Darryl M. Nuyda

1 Like