Error: Upgrade from 3.1.2-1 to 3.2.1-1

  • Application Version - 3.1.2-2

Hi Everyone,

Can you help me this Issue?

I am trying to Upgrade Our OJS to the Latest Version 3.2.1.1.

  • Description of issue

I got this issue in the screenshot:

OJS_001: I tried in the Command Prompt but I got this Error.

OJS_002: I tried in the Website Upgrade but it a same error in the Manual

OJS_003: I checked the database, I don’t Understand the error means.

OJS_004: I tried to another Computer, But other issues show up.

  • Steps you took leading up to the issue:
    I do my best and my capacity to solve this is not enough, I tried to search on another topic, but it seems the issue is not the same to others.

  • What you tried to resolve the issue

I just need to Upgrade my OJS from 3.1.2-2 to the latest Version 3.2.1-1.

Hope you Consider this Issue, HELP.

Thanks

Hi @Darryl_Nuyda,

Are you sure you’re running the upgrade on a database that hasn’t experienced an upgrade failure before? If an upgrade fails, you’ll need to restore from backup before trying again.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher;

for almost 2 years, I did not Upgrade our OJS 3.1.2-1 it because we don’t encounter an error on our OJS website, but recently we encounter a situation that can not happen, we forgot to renew our VPS server due to many reasons, after 60 days the server deleted our files and we don’t have backUp. To make a long story short! I got a backup database on GDrive. so I tried to patch up. Download the OJS 3.1.2-2 new version and run the Upgrade, but I encounter this error.

One of my Idea to put in my mind is to start upgrading the version from 3.1.2-1 to the next version until I got this 3.2.1-1.

Now, I tried to 3.1.2-1 to 3.1.2-2 and I get this Error ( DB Error: Unknown column ‘setting_type’ in ‘field list’).

I tried my back up 2 years ago, cause no one left on my server due to the deletion of the files, not renew on time.

To the point: I coming here again to ask some assistant for this error. What to do? do I need to?.

Thanks for your response.

I am trying to downgrade and everything, but the error “citations_submission_seq” Duplicate entry: 0-1. which table name belong this entities.

I check all thread here, how to solve this issue. I tried to restore the database many times but the error is the same.

On other Issue: email_template_data does not exist, I tried to install the new version 3.2.2-1 when I look up the email_template_data table name in the DB this email_template_data is not here.

Please Help.

Thanks

Hi @Darryl_Nuyda,

I’m a bit confused about versions – there isn’t an OJS 3.2.2-1 but you mentioned that in a few places. Do you mean 3.2.1-2?

Regards,
Alec Smecher
Public Knowledge Project Team

Oh sorry, it’s Typical Error. I mean this (http://pkp.sfu.ca/ojs/download/ojs-3.2.1-1.tar.gz).

Now I am Trying to Upgrade and Restore but the error is still the same.

Error: * A database error has occurred: Table ‘databasename.email_templates_data’ doesn’t exist

Thanks for your response.

@asmecher,

I follow this https://github.com/pkp/pkp-lib/issues/5296 topic and then, tried to Downgrade to 3.1.2 but got this error ‘citations_sequence_id’ and then check the database, the table.email_templates_data is theirs. So, I decided to Export the table email_templates_date table.

Proceed to 3.2.1-1 follow the procedure. then, re-upload again my backup database to local PhpMyAdmin. and do a SQL query in the database for email_templates_data and alter this.

Tha Error Shown: Duplicate Column name ‘email_id’ when I run the Upgrade to Command.

xampp_3.2.1.1

Thanks for the Response;

Hi @Darryl_Nuyda,

Can you describe what you mean by downgrading? For example, are you trying to revert a partially-upgraded 3.2.1-1 upgrade back to an older version manually (by altering the database structure or data)?

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,

I did not successfully Upgrade our OJS 3.1.2-1 to the latest version it because of this error that I got “A database error has occurred: Table ‘dbname.email_template_data’ does not exist”.

on the README instruction once you don’t have changes in templates(design) or any changes you can copy and paste the patch but u need to remain the "config.php, public folder, and files folder as per instruction.

From patch OJS 3.2.1-1 I copied and pasted(except the config, public folder) it to the directory of my publication. Deleted the file of OJS 3.1.2-1 and remain the (config, public, files, and folders). Then after that Execute the Upgrade into Shell Command the upgraded can not push through due to the error "A database error has occurred: Table ‘dbname.email_template_data’ does not exist

Then, I revert this Using this --> I follow this https://github.com/pkp/pkp-lib/issues/5296 topic and then, tried to revert to 3.1.2 but got this error ‘citations_sequence_id’ and then check the database, the table.email_templates_data is there. So, I decided to Export the table email_templates_date table and Alter It.

and proceed to upgrade to again to the OJS 3.2.1-1.

To Understand: Here is the Flow.

  1. From OJS 3.1.2-1 to 3.2.1-1 Upgrade but got this error table email_templates_data does not exist.
  2. Revert from 3.2.1-1 Files to OJS 3.1.2 execute the shell command but got this error ‘citations_sequence_id’.
  3. Check the database the email_templates_data are in here. decided to export and import to new execution which is to OJS 3.2.1-1.
  4. in the Final Testing of execution the error is this DB: Duplicate column name ‘email_id’.

and now I am looking into the DB which table is this email_id Column name.

Thanks for your response we appreciate it.

Darry Nuyda.

Hi @asmecher,

Can I ask for your help? What table entity belong to this error: Duplicate entry ‘0-1’ for key ‘citations_submission_seq’.

Thanks

DArryl

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’.

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.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I follow this instruction;

and I got this error;

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:

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