OJS 2.4.8 to 3.1.1-4 Call to a member function getFileId()

Hey,

I’m really desperate here, I’ve tried every solution possible for this matter but it seems to not work, I’m running the upgrade through SSH, I’ve runned this querys on my DB after reading a ridiculous amount of questions here:

SELECT a.article_id FROM articles a LEFT JOIN sections s ON (a.section_id = s.section_id) WHERE s.section_id IS NULL

I reassigned the sections as a Staff member already told following those scripts:

    INSERT INTO sections (journal_id, seq, editor_restricted, meta_indexed, meta_reviewed, abstracts_not_required, hide_title, hide_author, hide_about) SELECT journal_id, -9999, 1, 1, 0, 1, 1, 0, 1 FROM journals;

INSERT INTO section_settings (section_id, locale, setting_name, setting_value, setting_type) SELECT section_id, 'en_US', 'title', 'Artigos sem Sessao', 'string' FROM sections WHERE seq=-9999;

UPDATE articles a LEFT JOIN sections s1 ON (s1.section_id=a.section_id) LEFT JOIN sections s2 ON (a.journal_id=s2.journal_id AND s2.seq=-9999) SET a.section_id=s2.section_id WHERE s1.section_id IS NULL;

Still nothing works, memory limit, max execution time, all up to unlimited, php 7…

[code: Installer Installer::provideSupplementaryFilesForReview]
PHP Warning:  copy(/var/www/vhosts/OjsFSG/htdocs/files/journals/2//articles/1292/submission/proof/1292-8-4437-1-10-20150617.doc): failed to open stream: Arquivo ou diretório não encontrado in /var/www/vhosts/OjsFSG/htdocs/lib/pkp/classes/file/FileManager.inc.php on line 159
PHP Warning:  copy(/var/www/vhosts/OjsFSG/htdocs/files/journals/2//articles/1292/submission/review/1292-8--1-4-20150617.doc): failed to open stream: Arquivo ou diretório não encontrado in /var/www/vhosts/OjsFSG/htdocs/lib/pkp/classes/file/FileManager.inc.php on line 159
PHP Fatal error:  Uncaught Error: Call to a member function getFileId() on null in /var/www/vhosts/OjsFSG/htdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php:1065
Stack trace:
#0 /var/www/vhosts/OjsFSG/htdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php(315): PKPSubmissionFileDAO->_castToDatabase(NULL)
#1 /var/www/vhosts/OjsFSG/htdocs/lib/pkp/classes/file/SubmissionFileManager.inc.php(185): PKPSubmissionFileDAO->insertObject(Object(SupplementaryFile), '/var/www/vhosts...')
#2 /var/www/vhosts/OjsFSG/htdocs/classes/install/Upgrade.inc.php(1491): SubmissionFileManager->copyFileToFileStage('4437', 1, 4, NULL, true)
#3 /var/www/vhosts/OjsFSG/htdocs/lib/pkp/classes/install/Installer.inc.php(421): Upgrade->provideSupplementaryFilesForReview(Object(Upgrade), Array)
#4 /var/www/vhosts/OjsFSG/htdocs/lib/pkp/classes/install/Installer.inc.php(265): Installer->executeAction(Array)
#5 /var/www/vhosts/OjsFSG/htdocs/lib/pkp/classes/install/Installer.inc.php(186): Installer->executeInstaller()
#6 /var/www/vhosts/OjsFSG/ht in /var/www/vhosts/OjsFSG/htdocs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1065

Hi @bueeno123

Checking your log error message it says that files bellow can’t be found(Arquivo ou diretório não encontrado):
/var/www/vhosts/OjsFSG/htdocs/files/journals/2//articles/1292/submission/proof/1292-8-4437-1-10-20150617.doc
/var/www/vhosts/OjsFSG/htdocs/files/journals/2//articles/1292/submission/review/1292-8–1-4-20150617.doc

Could you check if they really exist and are “chmoded” with right permissions (reading/writitng permissions) ?

Best,
Israel

I’m facing the same error, It give me the error Unable to find a match for but file don’t exists

Hi @andrelzgava

Have you checked your wenserver log to verify which file can’t be found and double check whether it is missing?

Israel

Hi @israel.cefrin

Yesterday I tried to upgrade my OJS (Its was upgraded before (at least twice), without my action) then I take a conversation with another professional, he said that data folder was previously in another place, then I could recover most part of files, this morning I started the upgrade again in full files.
Server returned another error (review_round_id cant be null) I’m upgrading OJS 2.4.8 to 3.1.1.2 should I try to upgrade from 2.4.8 to a oldest one or can I run a SQL that will modify the structure of database to finish my upgrade?

Hi @andrelzgava

There are some suggestions in this topic:

Please, have a look into it and let us know whether it fixes the issue you’ve reported.

Best,
Israel

This didn’t help

I tryied to upgrade its return the error untill I discover When trying to update my Ojs from version 2.4.2.3 to Ojs 3.x then this log appears a blank screen with no functionality. Does anyone know why this? - #10 by Juan_Pablo_Giron_Rui Than It start giving error again with Uncaught Error: Call to a member function getFileId() on null in /pkp/classes/file/SubmissionFileManager.inc.php:184
I recover all the files to data dir that I could and I get no progress.

I’m almost giving up this, more than one week working on this, and no progress

Hi Andre,

Given you are running a OJS 2.4.2 version, could you please try an 2 steps upgrade? First to OJS 2.4.8 than to OJS 3 ?

Best,
Israel

Hi @andrelzgava,

If you are trying to upgrade from 2.4.2.3 direct to 3.x, you could face some problems. I was working about 1 month on the upgrade, and it always failed. The solution is first, be patient, and second one, upgrade by steps. In your case you need to upgrade first to nearest 2.4 version stable, after try upgrade to 3.0, until reach 3.1.x version. By each upgrade you need create a backup both content and DB.

Hello @israel.cefrin and @Juan_Pablo_Giron_Rui

Actually I found that post, with a relative problem that I’m facing, but my actual version is 2.4.8-5 and I tried to upgrade from it to 3 and all possible versions from original OJS site download (3.x.x), none of them worked, in the first 3 versions it returns errors on starting upgrade (usually error 500), after that some return this error that I mentioned previously (getFileId), in another return that a field in a table cannot be null (I found on a post in this forum saying that I should add this delete FROM review_assignments where reviewer_file_id is not null and review_round_id is null to my 3.0.0_update.xml (this solved this error but error getFileId still happening)).

I wouldn’t like to start mixing thing on database like drop/deleting updating records by myself, my database is to large, but I’m seeing no option to this problem, does anyone have another idea?

Thanks

@bozana, @asmecher, @NateWr and @mtub could you help with it?

Here is a new topic specific with all stack trace errors on debugging:

We tried to export import content from one to another, but it does’t work too.