OJS 3.2.1-1: production galleys not loading

Hello,

I’m having troubles with one article, the production galleys keeps on loading and never shows the option to add files:

image

and here is the console error message:

image

My php logs are not showing anything, do I have to activate the “debug” option on the config.inc.php file?

I hope you guys can help me with this!

Best regards,

Juan

Hi @Juan_Lopez,

There should definitely be something in your PHP error log corresponding to this 500 response; I’d suggest checking again.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks for the reply,

I tried turning the debug option into “on” but my ssl_error_log and my php_error_log doesn’t show anything about this issue

Hi @Juan_Lopez,

The debug option won’t help – in fact it’ll probably prevent your installation from working. If your server keeps a separate web server error log (e.g. Apache error log), you might also try looking there.

Regards,
Alec Smecher
Public Knowledge Project Team

My error log is not showing any error from this… in the meantime I did the editorial process all over again for the article that was presenting the problem.

I’ll be in touch if this happens again in the future.

Thanks for your time

Hi @asmecher , how are you?

I have the same error. OJS 3.2.1-1 it’s a multijournal upgraded from OJS 2

In some articles, galleys always loading.

server log only says:

X.X.X.187 - - [12/Jan/2021:05:21:28 +0100] “GET /index.php/XX/$$$call$$$/grid/article-galleys/article-galley-grid/fetch-grid?submissionId=5602&publicationId=16782&_=1610425331012 HTTP/1.1” 500 - “https://XX.es/index.php/XX/workflow/index/5602/3” “Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0”

I see in this article 2 versions. I see that admin removed one file from revision stage (log activity)
Perhaps, can this cause it?

Thanks

Hi @juanito,

That looks like it’s from the access log; the PHP error log should have more information on what’s causing that 500 error.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Thank you @asmecher .

I could to see the error:

[13-Jan-2021 02:19:23 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getFileId() on null in /var/www/XXX.es/www/lib/pkp/controllers/api/file/linkAction/FileLinkAction.inc.php:46
Stack trace:
#0 /var/www/XXX.es/www/lib/pkp/controllers/api/file/linkAction/DownloadFileLinkAction.inc.php(37): FileLinkAction->getActionArgs(NULL, 5)
#1 /var/www/XXX.es/www/controllers/grid/articleGalleys/ArticleGalleyGridCellProvider.inc.php(90): DownloadFileLinkAction->__construct(Object(Request), NULL, 5, 'html')
#2 /var/www/XXX.es/www/lib/pkp/classes/controllers/grid/GridCellProvider.inc.php(56): ArticleGalleyGridCellProvider->getCellActions(Object(Request), Object(ArticleGalleyGridRow), Object(GridColumn))
#3 /var/www/XXX.es/www/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1104): GridCellProvider->render(Object(Request), Object(ArticleGalleyGridRow), Object(GridColumn))
#4 /var/www/XXX.es/www/lib/pkp/class in /var/www/XXX.es/www/lib/pkp/controllers/api/file/linkAction/FileLinkAction.inc.php on line 46

I think that… if you remove file on revision stage or ¿galley? then, residual record left in the database?

Hi @juanito,

This might be issue #5740 – I’d suggest trying the database query suggested there. But please do take a complete database backup before doing that, just in case.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Thank you @asmecher

Output:

SELECT pg.file_id FROM publication_galleys pg LEFT JOIN submission_files sf ON (pg.file_id = sf.file_id) WHERE pg.file_id IS NOT NULL AND sf.file_id IS NULL;

| file_id |
+---------+
|       0 |
|       0 |
|       0 |
|       0 |
|       0 |
|       0 |
|       0 |
|       0 |
|       0 |
|       0 |
|       0 |
|       0 |
|   20949 |
|   20951 |
|   20953 |
|   21737 |
|   23187 |
|   23189 |
|       0 |
|       0 |
|       0 |
|       0 |
|       0 |
|   50295 |
|   51274 |
|   51274 |
|   52849 |
+---------+

Can i do UPDATE without fear, after backup?

UPDATE publication_galleys SET file_id = NULL WHERE file_id IN (SELECT pg.file_id FROM publication_galleys pg LEFT JOIN submission_files sf ON (pg.file_id = sf.file_id) WHERE pg.file_id IS NOT NULL AND sf.file_id IS NULL);

Thanks

Hi @juanito ,

The 0 values are probably not the issue (those probably correspond to remote galleys, I think). The rest of them, however, seem to be missing files and should be corrected. But yes, take a backup first.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Thanks @asmecher . It’s work. I owe you 3 pizzas :pizza: