[OJS 3.1.2.0 to 3.2] Upgrade Error - Duplicate column name ‘email_id’

Hi @adm_sub,

I would suggest first resolving the Access Denied messages; these are from MySQL/MariaDB, complaining that the credentials you’ve given to OJS don’t permit access to the database’s contents. Double-check your GRANT statements, and make sure that OJS has the access it needs to work with the database’s contents.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
thanks for the hint to first check the database access rights. I tried a couple of upgrades but unfortunately, nothing has worked.

As far as I understand it, the user has all necessary rights to access the database.
Anmerkung%202020-05-15%20083218

The password and names of user and database are also correct.

For testing purposes, I tried to create a new database, import the old data and assign a new user, but that didn’t work either.

Since the last upgrade in December to our current OJS version 3.1.2.4 nothing has changed in the database settings and access rights. So I am surprised that there are problems with updating here. These error messages (DB Error: Access denied for user '************'@'localhost' to database '********') do not appear in the error_log of our current installation (3.1.2.4).

I would be very grateful for ideas and suggestions.

Thank you,
Michael

Hi, @asmecher
I also cannot upgrade from 3.1.1.2 to 3.2.0.3
I have Error 500 after upgrade
Full package

I installed it into new directory, make all changes in config…
Then I renamed old directory to ojs.old, new directory to ojs
Selected PHP 7.2 on hosting
Get error 500
Support on hosting send me log

PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/triacon/domains/triacon.org/public_html/ojs/lib/pkp/lib/vendor/adodb/adodb-php/drivers/adodb-mysql.inc.php:461

I changed names of the directories back, old OJS (3.1.1.2) did not work.
I changed PHP to 5.2, 3.1.1.2 works now

Guys from support tell me that this is an error in OJS code
Could you please, help?

Hi @adm_sub,

OJS hasn’t changed between 3.1.2-4 and 3.2 with regard to its expectations for database credentials; I think this can probably be solved with the right SQL GRANT statement to ensure those credentials have access to everything in the database.

Hi @Diplodok,

Try searching the forum for the message Call to undefined function mysql_connect(); you’ll find lots of posts with suggestions.

Regards,
Alec Smecher
Public Knowledge Project Team

Dear @asmecher

I tried to many options, contacted to many peoples, but nobody know what I can do. I constantly, on upgrade, receive an error:

[22-June-2020 17:24:43 Europe/Belgrade] Table ‘temp_authors’ already exists
[22-June-2020 17:24:49 Europe/Belgrade] Duplicate column name ‘email_id’

I dropped the Table temp_authors and in error.log received only Duplicate column name ‘email_id’. Interesting that I came only with this error and cannot do nothing?
Is there any way to solve that or how I can bypass this to upgrade to the latest OJS? If I use some of older databases I do not have articles which are submitted after the date when backup made.
Any option to solve this problem?

Hi @Lazar_Stosic,

Do you have a backup that was made before you tried the upgrade to 3.2.x?

Regards,
Alec Smecher
Public Knowledge Project Team

HI @asmecher,
i had upgraded the OJS from 3.1.2.0 to 3.2 with help of softaculous ap installer when i gone for the upgrade it shows me following errors
installer.upgradeApplication
##installer.upgradeApplication##
##installer.upgradeInstructions##

##installer.installErrorsOccurred##:

##common.error.databaseError##

in error log it shows Duplicate column name ‘email_id’ , i rechecked the codes with the pkp/pkp-lib#5589 Fix upgrade for PostgreSQL · pkp/ojs@dbf319e · GitHub, but there are no changes in the files.

how can i able to solve this.

Hi @asmecher,

I have got a lot of backup. From time to time I made backup of full website and database. Also, I tried with few latest backup but receive the same errors. Do I need to check it more earlier how can find good DB?
By the way, in above post I saw /

Duplicate column name ‘email_id’ , i rechecked the codes with the pkp/pkp-lib#5589 Fix upgrade for PostgreSQL · pkp/ojs@dbf319e · GitHub
Do I need to try this also or?

Regards,
Lazar

Hi @salman20054,

you have got the same problem as I have. Read carefully this post above and you will find some solution, if you have backup.

Regards,
Lazar

Hi @Lazar_Stosic,
i had restored old database too, but right now the old database too not working, it shows fattal error issues.
PHP Fatal error: Uncaught Error: Call to a member function getLocalizedTitle() on null in /home/rubatosi/public_html/journals/lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php:156
Stack trace:
#0 lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php(44): NotificationsGridCellProvider->_getTitle(Object(Notification))
#1 /lib/pkp/classes/controllers/grid/GridCellProvider.inc.php(56): NotificationsGridCellProvider->getCellActions(Object(Request), Object(GridRow), Object(GridColumn))
#2 /lib/pkp/classes/controllers/grid/GridHandler.inc.php(1098): GridCellProvider->render(Object(Request), Object(GridRow), Object(GridColumn))
#3 lib/pkp/classes/controllers/grid/GridHandler.inc.php(1005): GridHandler->_renderCellInternally(Object(Request), Object(GridRow), Object(GridColumn))
#4 lib/pkp/classes/controllers/gr in lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php on line 156.

previously this backup works fine

Did you back old DB in new OJS or you back to the previous? If you made backup from old website all must working well.

Hi @asmecher,

if I create new database in latest OJS, how to transfer (Import and Export) users, issues, articles and other data? Is there some concrete table in database which I can export or that is impossible on that way? I try to find different way to go on the latest OJS because with oldest database that is impossible.

Thanks.
Lazar

Hi @Lazar_Stosic,

You can use the XML import/export tools, but those only transfer the published content – they do not transfer journal settings, user lists, etc. If you go this route, make sure to transfer the XML file into the same version of OJS, then perform an upgrade afterwards; the XML format is not designed to be 100% compatible between releases.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

thank you for answer and recommendation. I use this tools but have problems with users. Issues and articles are OK, but for import users receive:

ojs2: unable to find “name” userGroup node element. Check import XML document structure for validity.

I read a few posts related with this problem, like Importing users xml fails with missing user group name node element - #3 by astevens but still cannot solve it. If I solve that, then all problems will be solved. Static pages are not problems.

Regards,
Lazar

By the way, I tried to export Table Users from PhpMyAdmin from old database and import in new database. Now I have all users in the new database but the same are not listed in OJS. Do I need to Export and Import more Table beside Table Users?

Dear asmecher,

I have a question about the GRANT instructions. Which GRANT-statements are required? I ask because I don’t have administrator rights on our web server so the SQL GRANT statement must be executed by a service company.

Kind Regards

Anyone Help me to fix OAI-PMH harvesting error

Kindly help me sort out of this issue. Using OJS Current version: 3.2.1.1

BASE OAI-PMH Validator

https://skyfox.co/ojs/index.php/IJALS/oai

Validation Results

Repository Information

Name:

[ERROR: Could not fetch Identify response]

Admin:

[ERROR: Could not fetch Identify response]

Server communication

WARNING: Could not determine supported HTTP methods. Falling back to GET.

WARNING: Could not determine OAI-PMH protocol version; assuming 2.0

XML Validation

UNVERIFIED: XML response of Identify could not be validated: HTTP Error 500: Internal Server Error

UNVERIFIED: XML response of ListRecords could not be validated: HTTP Error 500: Internal Server Error

Harvesting

UNVERIFIED: Deleting strategy could not be checked: HTTP Error 500: Internal Server Error

UNVERIFIED: ListRecords batch size could not be checked: HTTP Error 500: Internal Server Error

UNVERIFIED: Resumption requests could not be checked: HTTP Error 500: Internal Server Error

UNVERIFIED: Incremental harvesting (day granularity) of ListRecords could not be checked: HTTP Error 500: Internal Server Error

UNVERIFIED: dc:language conformance to ISO 639 could not be checked: HTTP Error 500: Internal Server Error

UNVERIFIED: dc:date ISO 8601 conformance could not be checked: HTTP Error 500: Internal Server Error

UNVERIFIED: Minimal DC elements could not be checked: HTTP Error 500: Internal Server Error

by OAI-PMH Data Provider Validation and Registration

Initial validation checks (step 1)

baseURL is https://skyfox.co/ojs/index.php/IJALS/
Validation only
Request logged from 54.39.219.118

Checking Identify response

REQUEST https://skyfox.co/ojs/index.php/IJALS/?verb=Identify GET

WARN Malformed response: mismatched tag at line 16, column 2, byte 1457 at /usr/lib64/perl5/vendor_perl/XML/Parser.pm line 187. . The most common reason for malformed responses is illegal bytes in UTF-8 streams (e.g. the inclusion of Latin1 characters with codes>127 without creating proper UTF-8 mutli-byte sequences). You might find the utf8conditioner, found on the OAI tools page helpful for debugging.

FAIL Failed to parse Identify response

FAIL ABORT: Failed to parse Identify response from server at base URL ‘https://skyfox.co/ojs/index.php/IJALS/’.

The OAI-PMH data provider with base URL https://skyfox.co/ojs/index.php/IJALS/ has failed initial validation. Problems reported must be corrected before validation can continue.

Dear asmecher,

my problem has been solved in the meantime. The error when upgrading to OJS 3.2 was not due to missing access rights to the database, although the error messages pointed to it. Since we have self-written email templates, I tried your SQL statement “INSERT IGNORE INTO email_templates (email_key, assoc_type, assoc_id, enabled) SELECT etd.email_key, etd.assoc_type, etd.assoc_id, 1 FROM email_templates_data etd;” and after that the upgrade worked.

Thanks for your help!

Best regards

1 Like

@Lazar_Stoic. Almost a year late to the game here but I found how to fix the “assoc_type” issue

In the dbscripts/xml/upgrade/3.2.1_preupdate_subeditor_categories.xml file, comment out the line:

ALTER TABLE subeditor_submission_group ADD assoc_type BIGINT

Worked for my issues

A post was split to a new topic: Upgrade issues with DB