OMP 1.2 - Catalog Cover image problem

Hi all.

I encountered the following problem while trying to add a cover image to a monograph. It seems that the process does not add the selected cover image after saving the catalog form.

Thank you in advance.

Hi @Dimitris_Efstathiou

Could you maybe give us some more information? – I cannot reproduce the problem. For example, as which user at which workflow stage are you trying to do that, is there any (error) message, what exactly is happening…

Thanks!
Bozana

Ah, I was testing it with master branch, I will also take a look in OMP 1.2…

Hmmm… I had also no problems in OMP 1.2…

Thank you for the answer Bozana.

It seems that my local development environment (Windows 7, PHP 5.6, Apache 2.4) produces the problem, which I can’t reproduce at the beta environment (Ubuntu, PHP 5, ngix).

As a Press Manager I open the catalog form

and I am trying to upload a Cover Image. After uploading the image

and pressing Save, the form seems to submit but no change regarding the Cover Image is shown.

Thanks.

1 Like

I had exactly the same problem with OMP1.2. Have you found the solution?
Many thanks. GR

Dear All,
I resolved this problem simply by installing the GD library:
sudo apt-get install php5-gd
sudo service apache2 restart
Hope this is helpful to others having the similar problem.
I would like to thank Alec Smecher for his old post on Oct 30th, 2013 on this similar topic with OMP1.1.1.
Best, GR

For me the https://pkp.sfu.ca/support/forum/viewtopic.php?t=9245#p38334 fix worked.

The same goes for the OJS 3 as well.

Hi,

I am finding similar problems with OMP 1.2 (running PHP 5.6.18 and mysql 5.5.53-MariaDB)

After upgrading it from version 1.1.1.1 to 1.2 images files are not been uploaded successfully anymore. Neither cover images (in catalog) nor logo in website setup, for example. Before upgrading, upload was ok. There are two monographs with cover on our OMP.

When I turn on show_stacktrace and display_errors, OMP returns the following errors:

Strict Standards: Only variables should be passed by reference in /home/anppomc/public_html/ebooks/lib/pkp/classes/core/PKPApplication.inc.php on line 210
Strict Standards: Declaration of AboutContextHandler::authorize() should be compatible with PKPHandler::authorize($request, &$args, $roleAssignments, $enforceRestrictedSite = true) in /home/anppomc/public_html/ebooks/pages/about/AboutContextHandler.inc.php on line 19
Strict Standards: Declaration of CustomBlockPlugin::getContents() should be compatible with BlockPlugin::getContents($templateMgr, $request = NULL) in /home/anppomc/public_html/ebooks/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 19
Strict Standards: Declaration of ManageCatalogHandler::authorize() should be compatible with PKPHandler::authorize($request, &$args, $roleAssignments, $enforceRestrictedSite = true) in /home/anppomc/public_html/ebooks/pages/manageCatalog/ManageCatalogHandler.inc.php on line 0
Strict Standards: Declaration of ManageCatalogHandler::initialize() should be compatible with PKPHandler::initialize($request, $args = NULL) in /home/anppomc/public_html/ebooks/pages/manageCatalog/ManageCatalogHandler.inc.php on line 0

Other files format (PDF) are uploaded successfully.

php-gd package is installed and the solution mentioned by @Dimitris_Efstathiou didn’t worked for me.

Also found this entry on error_log

[07-Dec-2016 22:32:06 Europe/Moscow] PHP Strict Standards:  Only variables should be passed by reference in /home/anppomc/public_html/ebooks/lib/pkp/classes/core/PKPApplication.inc.php on line 210
[07-Dec-2016 22:32:06 Europe/Moscow] PHP Strict Standards:  Only variables should be passed by reference in /home/anppomc/public_html/ebooks/lib/pkp/classes/core/PKPApplication.inc.php on line 210
[07-Dec-2016 22:32:06 Europe/Moscow] PHP Strict Standards:  Declaration of CoverHandler::authorize() should be compatible with PKPHandler::authorize($request, &$args, $roleAssignments, $enforceRestrictedSite = true) in /home/anppomc/public_html/ebooks/controllers/submission/CoverHandler.inc.php on line 18
[07-Dec-2016 22:32:06 Europe/Moscow] PHP Strict Standards:  Declaration of CategoryGridHandler::setUrls() should be compatible with GridHandler::setUrls($request, $extraUrls = Array) in /home/anppomc/public_html/ebooks/lib/pkp/classes/controllers/grid/CategoryGridHandler.inc.php on line 0
[07-Dec-2016 22:32:06 Europe/Moscow] PHP Strict Standards:  Declaration of CategoryGridHandler::initialize() should be compatible with GridHandler::initialize($request, $args = NULL) in /home/anppomc/public_html/ebooks/lib/pkp/classes/controllers/grid/CategoryGridHandler.inc.php on line 0
[07-Dec-2016 22:32:06 Europe/Moscow] PHP Strict Standards:  Declaration of CategoryGridHandler::doSpecificFetchGridActions() should be compatible with GridHandler::doSpecificFetchGridActions($args, $request, $templateMgr) in /home/anppomc/public_html/ebooks/lib/pkp/classes/controllers/grid/CategoryGridHandler.inc.php on line 0
[07-Dec-2016 22:32:06 Europe/Moscow] PHP Strict Standards:  Declaration of GridCategoryRowCellProvider::getCellActions() should be compatible with GridCellProvider::getCellActions($request, $row, $column, $position = GRID_ACTION_POSITION_DEFAULT) in /home/anppomc/public_html/ebooks/lib/pkp/classes/controllers/grid/GridCategoryRowCellProvider.inc.php on line 19
[07-Dec-2016 22:32:06 Europe/Moscow] PHP Strict Standards:  Declaration of RepresentativesGridHandler::loadCategoryData() should be compatible with CategoryGridHandler::loadCategoryData($request, &$categoryDataElement, $filter = NULL) in /home/anppomc/public_html/ebooks/controllers/grid/catalogEntry/RepresentativesGridHandler.inc.php on line 28
[07-Dec-2016 22:32:06 Europe/Moscow] PHP Strict Standards:  Declaration of RepresentativesGridHandler::authorize() should be compatible with GridHandler::authorize($request, &$args, $roleAssignments, $enforceRestrictedSite = true) in /home/anppomc/public_html/ebooks/controllers/grid/catalogEntry/RepresentativesGridHandler.inc.php on line 28
[07-Dec-2016 22:32:06 Europe/Moscow] PHP Strict Standards:  Declaration of AboutContextHandler::authorize() should be compatible with PKPHandler::authorize($request, &$args, $roleAssignments, $enforceRestrictedSite = true) in /home/anppomc/public_html/ebooks/pages/about/AboutContextHandler.inc.php on line 19
[07-Dec-2016 22:32:06 Europe/Moscow] PHP Strict Standards:  Declaration of CustomBlockPlugin::getContents() should be compatible with BlockPlugin::getContents($templateMgr, $request = NULL) in /home/anppomc/public_html/ebooks/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 19

Any hint on what is happening?

Hi @mendesrocha

I am not sure how images changed from 1.1.1.1 to 1.2, but I will take a look, if this is maybe the same issue…

Thanks!
Bozana

1 Like

hi @bozana, thanks for your attention. I can provide further information, if you need it.

Sorry @mendesrocha for coming back so late. Hmmm… The image upload functions well for me in OMP 1.2 and those are not the errors related to this issue… thus could you maybe describe what exactly do you see when you try to upload an image, for example logo?
Your installation is not on Windows, right?
Have anything else changed in your server environment since the upgrade to 1.2?
Are you files and public folder permissions correct?
Thanks!
Bozana

hi @bozana,

In catalog window, after selecting the image file in my computer, the progress bar completes 100%, the name of the file is displayed on the page, nonetheless after pressing the save button, the page is reloaded as if no file was uploaded.

In websites setting, when I try to upload a logo, pop ups an error dialog that says “No file were sent, or invalid file type”. I tried both png and jpg file extensions.

I don’t know about big changes in the server side. It is managed by a third-party company. Anyways, we have both OCS (2.3.6) and OJS (2.4.2) in the same server and image upload are ok for both.

I’ve checked the permissions for public (755) and files-dir (700), and it seems ok. I even tried changing them to 777, but the problem persisted. I also noticed the the files names are been recorded to “temporary_files” table in database. And files appear in files-dir/temp directory.

Two more things.

  1. I tried to upload an image using the TinyMCE editor in a form and it was uploaded. So I temporaryly solved the issue by doing this (the editor needs to release the new volume this month).

  2. I found that the small icons are not been properly exhibed. Like the magnifieng glass in the searchbox or the ‘cross’ symbol to close the extras window.

Hi @mendesrocha

I’ve just had the same issue in OJS – I also had the message “No file were sent, or invalid file type” when uploading the site logo. It was because my public folder didn’t have the right permissions. The image was already copied to the public folder, but with the wrong owner/permissions. I had to remove that image from the public folder, set the owner and permissions correctly and then it worked. Thus could you double check if there is already an image something like “pageHeaderLogoImage…” in your public folder for that press? If so you could remove that image, set the folder user and permissions correctly, and then try to upload the logo via UI again.

Best,
Bozana

hi @bozana,

thanks again for your attention.

I could not find any "pageHeaderLogoImage" in public or any subdirectories of it. I guess I have never uploaded some before.

My main issue is with cover images. I see that in omp-files there is a subdirectory named temp where I can find the files I am uploading with same size but modified names and no extension. The last file I upload was renamed to “jpeg0FoinP”. I saw also that omp-files/presses/1/monographs, there is a “simple” subdir only in the firsts two book I could properly upload the cover. I guess the problem might be on copying files from the “omp-files/temp" to "omp-files/presses/1/monographs/#/simple”.

I tried changing permissions of “omp-files/presses/1/monographs/#” to 777 and then upload the image but nothing changes.

Finally, I found a (tricky) solution – not the best one – but solved the issue.

  1. I make simple subdirectory of monograph, then manually upload cover.png there.

  2. Return to settings\website and changed data in cover thumbnails section. Then, OMP created thumnail.png from cover.png

  3. I went through database and run the following:

UPDATE ‘omp’.‘published_submissions’ SET ‘cover_image’ = ‘a:8:{s:4:“name”;s:9:“cover.png”;s:5:“width”;i:500;s:6:“height”;i:680;s:13:“thumbnailName”;s:13:“thumbnail.png”;s:14:“thumbnailWidth”;d:74;s:15:“thumbnailHeight”;d:100;s:10:“uploadName”;s:8:“capa.png”;s:12:“dateUploaded”;s:19:“2015-12-12 07:43:02”;}’ WHERE ‘published_submissions’.‘pub_id’ =6;

Gotcha! Cover is been exhibited for monograph #6.

@mendesrocha bozana asked you but I don’t know if it has been answered. Are you using Windows as the host of your web server?

hi @Dimitris_Efstathiou,

No, I am not using Windows, the server is Linux.

Hi mendesrocha,
I am having the same probelm:

Have you managed to solve it?
Thank you!
Best,
Saidou

@saidou, take a look at this conversation to see if it matches your problem:

Thank you! actually I simply run an “upgrade” on the database (php tools/upgrade.php upgrade), and it solved the problem!