OMP 1.2 CoverHandler, function "cover" does not work

Hi,

the function “cover” in the CoverHandler.inc.php does not work for me. The documentation says:

// this function is only used on the book page i.e. for published monographes

But:

  1. I call it for a published monograph and it still does not work
  2. in monograph_full.tpl the op “thumbnail” is used for the book page, not “cover”. If I change it to “cover”, the image won’t show up

If I replace

$publishedMonograph = $this->getAuthorizedContextObject(ASSOC_TYPE_PUBLISHED_MONOGRAPH);

in the “cover”-function of the CoverHandler with

$monograph = $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
$publishedMonographDao = DAORegistry::getDAO(‘PublishedMonographDAO’);
$publishedMonograph = $publishedMonographDao->getById($monograph->getId(), null, false);

then in both cases, the large cover shows up.

best,
Carola

Hi @carola,

Thanks for the heads-up – I’ve filed this for attention at Test/fix cover image view · Issue #1470 · pkp/pkp-lib · GitHub.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher and @bozana,

I see that you made the fix for the master branch but not for omp-stable-1_2_0. Is there a chance that you pull the fix to omp-stable-1_2_0? We need the function for two of our plugins.

best,
Carola

Hi @carola,

Ah, good spotting – yes, I’ve just cherry-picked this over to omp-stable-1_2_0 and omp-dev-1_2.

Regards,
Alec Smecher
Public Knowledge Project Team