No longer generating images after upgrade to Version 5

Created on 13 December 2022, over 1 year ago
Updated 15 August 2023, 11 months ago

Problem/Motivation

After upgrading to version 5 of this module, the image generation is no longer working and all PDF Thumbnails show with the 'Generic' generic.png image. Also, no previous thumbnail images show on the PDF Image Entities list at admin/media-pdf-thumbnail/settings/list.

Version 5.3
Drupal Core 9.4.8
Php 8.1

Current Field Display Configuration

All legacy thumbnails are now missing

All PDFs now show the 'generic' image.

🐛 Bug report
Status

Closed: works as designed

Version

5.3

Component

Code

Created by

🇺🇸United States brooke_heaton

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India itsmebhupendra

    I can confirm that the bug is still there, it is not picking up the configured / mapped PDF field and not generating the thumbnails. I have tried uninstalling then installing and configuring it again.

  • 🇮🇳India itsmebhupendra

    I have done everything I can, but the thumbnails are not getting generated, nothing is going in to the table "pdf_image_entity".

    Downgrading the module to older version is not recommended. We have this issue on our 12 production sites.

    It will be great if anyone can help here.

  • 🇮🇳India hitesh_bhargav

    Created that patch and it's work for me.

  • 🇺🇸United States fallenturtle

    Similar issue here with D9. Nothing in database. No error. Just nothing. Tried uninstalling and reinstalling. Tried this patch. Tried the V6 beta. No luck.

    Should the spatie/pdf-to-image library be in the vendor directory or the libraries directory?

  • 🇫🇷France sgostanyan

    spatie/pdf-to-image should be installed with composer

    Could you give details about how you configured settings (all steps) ?

    Also what is your version of imagick, php and drupal core ?

    The fact that there is no error probably means the field is not handled by the module (config issue or way of use)

  • 🇺🇸United States fallenturtle

    I appreciate your quick response, thank you. :)

    I did install pdf-to-image with composer. Some modules require libraries in the libraries directory vs the default vendor library and we have composer.json set up to install libraries in the correct location as needed. So I just wanted to be sure. Sounds like "vendor" is the answer.

    It wouldn't surprise me in the least if I missed some config somewhere.

    PHP 8.0.16
    imagick 3.7
    Drupal 9.5.5
    pdf-to-image 2.1.0

    We were originally on v3 of the module so here are the steps we took:
    -drush pmu media_pdf_thumbnail
    -composer require 'drupal/media_pdf_thumbnail:^5.5'
    -clear cache
    -run database update
    -drush en media_pdf_thumbnail

    We have a media entity type called PDF with thumbnail
    -Changed all displays to use Media PDF Thumbnail Image
    -Add media item, give name, upload PDF, add description

    Thumbnail just shows generic image. I've tried both with and without the patch.

  • 🇫🇷France sgostanyan

    Yes pdf-to-image goes into "vendor" ;)

    The upgrade process is good but the updb has to be run after enabling the module.

    Just for being sure, when you say "Changed all displays", you mean Media entity view modes, right ? So I understand you are rendering thumbnail field throught the whole Media entity render ? I'm asking this because some people confuse entity render et single field render.
    For example in the admin media list page /admin/content/media which is a page built with Views (field render), settings made in Media view modes won't work.

    Could you please have a look on this, just in case ?

  • 🇺🇸United States fallenturtle

    I think I'm doing it in the right place. /admin/structure/media/manage/pdf_with_thumbnail/display for my media type.

    UPDB says "No pending updates."

  • Status changed to Closed: works as designed 11 months ago
  • 🇫🇷France sgostanyan

    I'm closing that issue because it doesn't seem to be a bug but just a configuration ununderstanding.
    Please update to version 6 and refer to the documentation

Production build 0.69.0 2024