OMP - Cover images disappear after upgrade

Hello friend,

I finally update my OMP to 3.2.1.4, but the cover images disappear. Whats happening?

Hi @BrunoCampos,

Are they not appearing on your site - or do the files still reside in the file directory on your server, do you know?

-Roger
PKP team

In my site doesnt show cover images

Hi @BrunoCampos,

Okay - but are you able to see the image files on your server in the /public directory? And do you see any notices in your PHP error log that may point to the images not being shown on your site?

-Roger
PKP team

Friend,

Im sorry, i was very busy in the last month.

  1. Yes, my files dir always shows images. When i transfered the files to new server, PDF is able, but images not.
  2. I didn´t see this log yet. I´ll see.

I have the same issue. Upgrading from db v. 3.1.0.0 to 3.3.0.5.

Script returns the following for all monographs:

[code: Installer Installer::migrateSubmissionCoverImages]
PHP Warning: copy(presses/1/monographs/1/simple/cover.jpg): failed to open stream: No such file or directory in /home/0/w45/beta/lib/pkp/classes/file/FileManager.inc.php on line 182
etc.

The file is in the files folder. Upgrade finishes with no further errors. But UTF-8 encoding seems to be broken (Scandinavian letters are corrupted) and all covers are missing.

Hi @BrunoCampos,

Hmmm… it might be difficult to assess exactly what is happening here without seeing error logs, so I’m afraid I can’t offer any further suggestions.

-Roger
PKP Team

The problem is exaclty that GEIRROSSET posted. Shows a lot of messages:

Installer Installer::migrateSubmissionCoverImages]
PHP Warning: copy(presses/1/monographs/1/simple/cover.jpg): failed to open stream: No such file or directory in /home/0/w45/beta/lib/pkp/classes/file/FileManager.inc.php on line 182
etc.

Its a great problem because i have to put over cover images again. I have 700 cover imagens to post

Please, help us. Because i have afraid when i upgrade again OMP, cover imagens disappear again. The files exists, but the OMP don´t load.

I have the same problem of geirrosset.
Update from 3.2 to 3.3.0.5 without error messages.
Files in the folder (not web accesible) but dont show the covers.
And cant install new plugins.

Buy if i restore the backup all working again. Thanks for the help.

1 Like

Hi @geirrosset
Were you able to solve this problem?
We just upgraded to 3.3.0.7 and have the same problem.
/ Maria

I changed the user and group of the files directory so that I could both read and write to it. After that it seems that the stuff that was done to the cover images worked.

We had a deadline with no solution in sight so we had to start from a blank and resubmit all the monographs. Luckily we had just 12. Still a problem I feel v3+ should have been without.

So I spent the day struggling with this problem because I’m trying to upgrade our OMP instance. It appears that the file directory path isn’t being passed inside the migrateSubmissionCoverImages function in classes/install/Upgrade.inc.php.

at line 762 I changed:

// Get existing image paths
$basePath = Services::get('submissionFile')->getSubmissionDir($row->context_id, $row->submission_id);
$coverPath = $basePath . '/simple/' . $coverImage['name'];
$coverPathInfo = pathinfo($coverPath);
$thumbPath = $basePath . '/simple/' . $coverImage['thumbnailName'];
$thumbPathInfo = pathinfo($thumbPath);

to:

// Get existing image paths
$basePath = Services::get('submissionFile')->getSubmissionDir($row->context_id, $row->submission_id);
$coverPath = Config::getVar('files', 'files_dir') . '/' . $basePath . '/simple/' . $coverImage['name'];
$coverPathInfo = pathinfo($coverPath);
$thumbPath = Config::getVar('files', 'files_dir') . '/' . $basePath . '/simple/' . $coverImage['thumbnailName'];
$thumbPathInfo = pathinfo($thumbPath);

And it worked!

Hi @bart,

I see you’ve filed this as a github issue at [OMP] No cover images after upgrading to 3.3.0.7 · Issue #7173 · pkp/pkp-lib · GitHub – I’ll continue the conversation there, thanks!

Regards,
Alec Smecher
Public Knowledge Project Team