Upgrade from 3.3.0.13 to latest

@asmecher I want o know that can I directly upgrade ojs from version 3.3.0.13 to latest one?

Hi @doneforyou,

You should be able to. You can see our upgrade guide for detailed guidance here: https://docs.pkp.sfu.ca/dev/upgrade-guide/en/

And more specific information on the latest version (3.4) here: https://docs.pkp.sfu.ca/dev/release-notebooks/en/3.4-release-notebook

-Roger
PKP Team

@rcgillis though I am not kind of expert, but can I take the answer as its safe to go directly to final version from 3.3.0.13?

Hi @doneforyou,

Yes - that upgrade path should work fine.

-Roger
PKP Team

@rcgillis though I am late, but can now safe to upgrade from 3.3.0.13 to OJS 3.4 directly?

Hi @doneforyou,

Yes - that should be fine.

-Roger
PKP Team

@rcgillis thank you but I am getting this error when I am trying to browse the site after setting installed=off for the upgrade

On the other hand, before getting the below error, it was sending me to the new installation with broken page where I was unable to see the upgrade option, after putting the old config file back, now I am getting this error.

Side Note: 1st I have carefully copies the option from previous config file to new one, but all above was happening.

[03-Dec-2023 08:32:00 America/Boise] PHP Fatal error: Uncaught Exception: Mailer driver isn’t specified in the application’s config in /home2/asf/public_html/asf/lib/pkp/classes/core/PKPContainer.php:315
Stack trace:
#0 /home2/asf/public_html/asf/lib/pkp/classes/core/PKPContainer.php(268): PKP\core\PKPContainer::getDefaultMailer()
#1 /home2/asf/public_html/asf/lib/pkp/classes/core/PKPContainer.php(117): PKP\core\PKPContainer->loadConfiguration()
#2 /home2/asf/public_html/asf/lib/pkp/classes/core/PKPApplication.php(228): PKP\core\PKPContainer->registerConfiguredProviders()
#3 /home2/asf/public_html/asf/lib/pkp/classes/core/PKPApplication.php(200): PKP\core\PKPApplication->initializeLaravelContainer()
#4 /home2/asf/public_html/asf/classes/core/Application.php(50): PKP\core\PKPApplication->__construct()
#5 /home2/asf/public_html/asf/lib/pkp/includes/bootstrap.php(37): APP\core\Application->__construct()
#6 /home2/asf/public_html/asf/index.php(18): require_once(‘/home2/asf…’)
#7 {main}
thrown in /home2/asf/public_html/asf/lib/pkp/classes/core/PKPContainer.php on line 315

@rcgillis sorry to keep you bugging, I have recreated the config.inc.php file, and seem things are fine until I get an upgrade installation page, but after that it reloads itself and error.log throughing this error
Errors occurred during installation:

  • A database error has occurred: There are author records without matching user_group entries. Please correct these before upgrading.

How to overcome with this?

This topic was automatically closed after 7 days. New replies are no longer allowed.

Hi @doneforyou,

There’s orphan data (as an example of orphan data, I could say a submission that belongs to a journal that was removed from the system) in your database and OJS 3.4 is more strictly about it.

Do you have access to the database or someone with technical knowledge that can run the query below? Then I’ll need to see the output.

SELECT a.author_id, a.user_group_id, a.publication_id, p.submission_id, j.journal_id, (
	SELECT GROUP_CONCAT(ug.user_group_id)
    FROM user_groups ug
    WHERE ug.context_id = j.journal_id	
    AND ug.role_id = 65536
) AS alternatives
FROM authors a
LEFT JOIN user_groups AS ug ON ug.user_group_id = a.user_group_id
LEFT JOIN publications AS p ON p.publication_id = a.publication_id
LEFT JOIN submissions AS s ON s.submission_id = p.submission_id
LEFT JOIN journals AS j ON j.journal_id = s.context_id
WHERE ug.user_group_id IS NULL

Best,
Jonas Raoni

@jonasraoni
Thank you for your kind help. I am attaching csv output of the results exported after execution of above query.
https://www.fescoonlinebillchecker.pk/wp-content/uploads/2024/01/query.csv

Hi @doneforyou!

I’m considering that you’ve already got a database backup, so here are the fixes:

First run the two queries below. After that you can re-run the previous query, to check if the cleanup was successful (the previous query shouldn’t find any record). And finally run the upgrade again.

This will delete authors that have a bad publication ID (you can inspect those authors later using a backup).

DELETE FROM authors WHERE publication_id = 0

This will assign a user group to the authors that have none.

UPDATE authors a
INNER JOIN publications AS p ON p.publication_id = a.publication_id
INNER JOIN submissions AS s ON s.submission_id = p.submission_id
INNER JOIN journals AS j ON j.journal_id = s.context_id
SET a.user_group_id = (
	SELECT ug.user_group_id
	FROM user_groups ug
    WHERE ug.role_id = 65536
    AND ug.context_id = j.journal_id
    ORDER BY ug.user_group_id
    LIMIT 1
)
WHERE a.user_group_id IS null

Best,
Jonas Raoni

1 Like

I’ll close this topic, in case you’ve got new problems, feel free to get in touch.