Article galley links, server crash and missing files

This post is related to another resolved post, which was closed, but there are still some unanswered questions and errors. (Article galley links not working in some cases - #5 by Ant_Forshaw)

I have coped our live 3.1.2.1 OJS to a new server and upgraded to 3.3.0.10, and that is working apart from some of the galley links not working. Attempting to download the full-text or PDF files results in a 500 internal server error for the full-text and a 404 not found error for the PDF files.

I had neglected to copy over the /OJS/ folder from the root of the server (outside of the webroot) and now that has been done, it has resolved some of the issues, however there are some unexplained errors still occurring.

[Tue Aug 09 09:47:47.702792 2022] [php7:error] [pid 36454] [client 78.149.30.230:58760] PHP Fatal error:  Uncaught League\\Flysystem\\FileNotFoundException: File not found at path: journals/1/articles/573/submission/proof/573-1-5066-2-10-20220629.html in /var/www/html/lib/pkp/lib/vendor/league/flysystem/src/Filesystem.php:389\nStack trace:\n#0 /var/www/html/lib/pkp/lib/vendor/league/flysystem/src/Filesystem.php(179): League\\Flysystem\\Filesystem->assertPresent()\n#1 /var/www/html/plugins/generic/htmlArticleGalley/HtmlArticleGalleyPlugin.inc.php(131): League\\Flysystem\\Filesystem->read()\n#2 /var/www/html/plugins/generic/htmlArticleGalley/HtmlArticleGalleyPlugin.inc.php(111): HtmlArticleGalleyPlugin->_getHTMLContents()\n#3 /var/www/html/lib/pkp/classes/plugins/HookRegistry.inc.php(107): HtmlArticleGalleyPlugin->articleDownloadCallback()\n#4 /var/www/html/pages/article/ArticleHandler.inc.php(426): HookRegistry::call()\n#5 /var/www/html/lib/pkp/classes/core/PKPRouter.inc.php(395): ArticleHandler->download()\n#6 /var/www/html/lib/pkp/classes/core/PKPPageRouter.inc.php(246): PKPRouter->_authorizeInitializeAndCallRequest()\n#7 /var in /var/www/html/lib/pkp/lib/vendor/league/flysystem/src/Filesystem.php on line 389, referer: https://production.veterinaryevidence.org/index.php/ve/article/view/573

The error above shows that there is a file missing from the OJS folder that is causing the crash:

journals/1/articles/573/submission/proof/573-1-5066-2-10-20220629.html

However on the live server (3.1.2.1) this file is also missing, but there are no errors being reported and the full-text galley displays correctly. This is my point of confusion - how can it crash the upgraded server but not the live one, assuming both files are missing?

Checking the download links on both the live and dev server, they are identical, but are attempting to grab different files in each case - Is this a bug??

There appear to be some operational differences between OJS 3.1 and 3.3 (which is expected) but I’m not aware of what they are. How can the file be missing on both servers but only crash the new one?

If I can resolve this issue then I will be able to complete my project and put the new site live, so any help here is much appreciated.

Many thanks in advance,

Anthony