[OJS 3] Database upgrade problem?

Hello all,

I’m trying to upgrade an OJS 2.x database to OJS 3, but after running the php tools/upgrade.php upgrade, it still claims database version is older…
image

Any ideas why the HTML code is being output and why the commands didn’t apparently execute?

Is there a problem with my CLI config?

Hello all,

Anyone??
Need to fix this ASAP…

Hi @ramon,

It looks like you have debug turned on in config.inc.php. What do you get with that turned off?

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,

That was probably the reason for so much HTML displayed…
Now, this has popped up:

PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/ojs3/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 386

Is it serious?

Hi @ramon,

No, that’s cosmetic.

Thanks,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,

Probably a php configuration variable, but these messages are creeping up:

PHP Notice: Only variables should be passed by reference in /var/www/ojs3/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 267

These also:
PHP Warning: Declaration of SubmissionLanguageEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL) should be compatible with ControlledVocabEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL, $filter = NULL) in /var/www/ojs3/lib/pkp/classes/submission/SubmissionLanguageEntryDAO.inc.php on line 46
PHP Warning: Declaration of SubmissionSubjectEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL) should be compatible with ControlledVocabEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL, $filter = NULL) in /var/www/ojs3/lib/pkp/classes/submission/SubmissionSubjectEntryDAO.inc.php on line 44
PHP Warning: Declaration of SubmissionAgencyEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL) should be compatible with ControlledVocabEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL, $filter = NULL) in /var/www/ojs3/lib/pkp/classes/submission/SubmissionAgencyEntryDAO.inc.php on line 44

Hi @ramon,

Those are all cosmetic and as long as your errors and warnings are directed to the log file, rather than the browser, they won’t interfere.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,
After running for quite a while, system still claims DB needs to be upgraded…

We had a few network connection problems… But I don’t think they would be of harm, since it’s running MySQL on the same virtual machine…

image

Hi @ramon,

There is a Fatal Error in your screenshot; I’d suggest searching the forum for that message.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,

I found this topic.

I’ll try the SQL’s and see if they help…

Should I upgrade to 3.0.1 then upgrade OJS 3?

Hello all,

As recommended by topic linked above, upgrade from 2.x to 3.x MUST be:

  1. Upgrade to OJS 3.0.1

  2. Upgrade to latest OJS 3.x version.

But, this error happened:

[code: Installer Installer::enabledSitePlugins]

[code: Installer Installer::moveCSSFiles]

[code: Installer Installer::moveReviewerFiles]

[code: Installer Installer::fixAuthorGroup]
[data: dbscripts/xml/upgrade/3.0.0_reviewer_files.xml]

[code: Installer Installer::removeCancelledReviewAssignments]
[data: dbscripts/xml/upgrade/3.1.0_notifications.xml]
[data: dbscripts/xml/upgrade/3.1.0_notes.xml (skipped)]
[data: dbscripts/xml/upgrade/3.1.0_galley_settings.xml]
[data: dbscripts/xml/upgrade/3.1.0_update.xml]
ERROR: Upgrade failed: DB: Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘date_decided’ at row 310

Hi @ramon,

Check your OJS 2.x database’s edit_decisions table to ensure that all rows have a valid date and time in the date_decided column.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,

I have 54 records with date_decied = 0000-00-00 00:00:00
Why is that a problem?
How can I fix this?

Hi @ramon,

That’s invalid/bad data, and should be corrected to a valid date and time.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,

There are a bunch of warnings of missing files:
PHP Warning: copy(/home/ramon/ojs3-submission-files/journals/2//articles/4392/attachment/4392-1-12775-1-13-20180917.jpg): failed to open stream: No such file or directory in /var/www/ojs-3.0.1/lib/pkp/classes/file/FileManager.inc.php on line 159

I wonder what could this be…
files_dir doesn’t have any trailing slashes…

We’ve experienced some strange behavior in OJS 2, where some authors managed to complete a submission without uploading a submission file…

Hi @ramon,

I’d suggest posting that as a new forum topic. That’ll help keep the forum organized for others who encounter the same problem.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,

As soon as possible I’ll open another thread with that issue.
However, we’ll soon be moving to OJS 3…
It finally worked!

Gladly, all the procedure is documented!