[OJS3.1.2-1] Production galley files not loading

Hello all,

After upgrade to OJS3.1.2-1 , we ran into this error in our production can some please point me to a possible solution? Attached is image of the issue and error found in php_error.log. I have read all posts on the forum but none of the suggestion has resolved our issue.

Thanks for any help!

[Mon Jun 10 12:45:09.261627 2019] [php7:error] [pid 2840] [client 10.70.130.53:57739] PHP Fatal error: Uncaught Error: Call to a member function getFileId() on null in /var/www/html/ojs-3.1.2-1/lib/pkp/controllers/api/file/linkAction/FileLinkAction.inc.php:46\n

Stack trace:\n

#0 /var/www/html/ojs-3.1.2-1/lib/pkp/controllers/api/file/linkAction/DownloadFileLinkAction.inc.php(37): FileLinkAction->getActionArgs(NULL, 5)\n

#1 /var/www/html/ojs-3.1.2-1/controllers/grid/articleGalleys/ArticleGalleyGridCellProvider.inc.php(82): DownloadFileLinkAction->__construct(Object(Request), NULL, 5, ‘PDF’)\n

#2 /var/www/html/ojs-3.1.2-1/lib/pkp/classes/controllers/grid/GridCellProvider.inc.php(56): ArticleGalleyGridCellProvider->getCellActions(Object(Request), Object(ArticleGalleyGridRow), Object(GridColumn))\n

#3 /var/www/html/ojs-3.1.2-1/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1098): GridCellProvider->render(Object(Request), Object(ArticleGalleyGridRow), Object(GridColumn))\n

#4 /var/www/html/ojs-3.1.2-1/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1005): GridHandler->_renderCellInternally(Object(Request), Object(Art in /var/www/html/ojs-3.1.2-1/lib/pkp/controllers/api/file/linkAction/FileLinkAction.inc.php on line 46,

referer: https://journalhosting.ucalgary.ca/index.php/ijnss/workflow/index/56768/4

ScreenClip

We had to resolve by copying files manually on the linux filesystem and add records to database, all done in back end, and it can also be done from the front end which is easier. please see attachment for details.

ScreenClip-a ScreenClip-b

So I successfully wrote this query to return: all submission records or (SM in its file name as demonstrated in above screenshot) that do not have original files, in another word this query below will return missing original file records.

select * from
(select * from
(select submission_id, count(*) as ‘submission id count’ from submission_files group by submission_id) t1 where t1.submission id count = 1) t1 inner join
(select * from submission_files where source_revision is not null) t2 on t1.submission_id=t2.submission_id;

Dung.

Hi @dung,
I’m having this problem too, in version 3.2.0-2, using Postgres.
Even in new submissions, this error appears, but when I ran your query, I encountered problems only from years before 2018. If I copy files as you suggested, will this error be solved?

  1. I am not sure why only records from years before 2018 returned, but my logical guess is that records from after 2018 do not meet the condition of the query, in that case if you want to look for those after 2018 you will need to understand your records after this year and change the query accordingly.

  2. Yes when you copy files it will resolve this error so your application can work again. But you must be careful with all input values for fields of the records, as you can see they are pair pattern etc …

I hope you will solve your issue.

Hi @dung,
Could i just delete these submissions?

Hi Adriano_Jose,

It is possible that it will work as you can see in the error the key part is “Call to a member function getFileId() on null” but you may run into different error. The only way to know is trying it because we do not know how the logic of the code/application functioning.

Dung.

Hi @dung,
this didn’t work. Of the query results, I deleted all submission_id in submissions and all files_id in submission_files.
Anyway, thanks for listening.

Hi Adriano_Jose,

Sorry to hear that but clearly I did not try to remove but to add.

Dung.

I have a problem when i try to posting/upload my galley in step of production. But, i failed, because when i click galley button, there is no response or the cursor only running without appear of the galley button for upload galley.

Thanks very much
Rahadian Zainul

Hi Adriano Jose, can you help me, please

I have a problem when i try to posting/upload my galley in step of production. But, i failed, because when i click galley button, there is no response or the cursor only running without appear of the galley button for upload galley.

Thanks very much
Rahadian Zainul

Hi everybody, can you help me, please

I have a problem when i try to posting/upload my galley in step of production. But, i failed, because when i click galley button, there is no response or the cursor only running without appear of the galley button for upload galley.

Thanks very much
Rahadian Zainul