Title: pdf thumbnails not generated php7.0
Last modified: February 5, 2018

---

# pdf thumbnails not generated php7.0

 *  Resolved [pcoweb](https://wordpress.org/support/users/pcoweb/)
 * (@pcoweb)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/)
 * I recently upgraded from php5.6 to php7.0 and I notice that the pdf thumbnails
   are not being generated properly when mla is activated. I tested by deactivating
   the plugin and then uploading the same file again, and the thumbnail is properly
   generated. I do not use a special plugin to generate the thumbnails (as far as
   I know), I am relying on the core feature that started in WP 4.7. I am running
   MLA 2.70.

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Thread Starter [pcoweb](https://wordpress.org/support/users/pcoweb/)
 * (@pcoweb)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-9937459)
 * I find some path errors in my folders when I ‘regenerate’ the native WP thumbnails
   that are missing.
 * When regenerating, I find the thumbnails in
 * wp-content/uploads/2018/02/2018/02
 * but they should be in
 * wp-content/uploads/2018/02/
 * making a copy of the files in the second directory seems to have fixed the thumbnail
   preview.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-9940038)
 * Thanks for your report and for the additional information about the directory
   mixup.
 * I have just run some tests on my own system, which is running PHP 7.0.14. The
   WordPress thumbnail generation is working on my system. I do know that the WordPress
   process fails intermittently based on tickets in the Trac system, but this isn’t
   common. Have you tried to upload more than one file? If you upload two or more
   files, do they all fail?
 * I also know that different PHP 7.x versions have different behavior. Can you 
   tell me exactly what version you are using?
 * Finally, thanks for alerting me to the “wrong directory” problem! I assume you
   are using MLA’s “Thumbnail” bulk action to do the regeneration. This is an MLA
   defect I have reproduced on my system. I will fix it and post an update here 
   when I have progress to report.
 * Any additional information you can supply will be most helpful. Thanks for your
   help.
 *  Thread Starter [pcoweb](https://wordpress.org/support/users/pcoweb/)
 * (@pcoweb)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-9940287)
 * Thanks for the quick investigation.
 * 1) I am running php 7.0.27.
    2) I don’t recognize the trac system. Is that another
   plugin? I don’t use that. 3) I did reproduce my problem with multiple pdfs and
   I deactivated and reactivated several times to verify that the interaction with
   the MLA plugin was causing the issue. Perhaps there is some particular configuration
   issue with my site or another plugin. I will turn off other modules and fall 
   back to a basic theme to try to reproduce with a bare-bones installation. This
   might take me a couple days to investigate. I can share my settings, but I can’t
   figure out where the settings file goes when I ‘export ALL settings’ on the MLA
   general tab.
 * On the ‘shortcodes’ tab, I have the following:
    Enable thumbnail substitution–
   unchecked Enable featured image – checked Enable featured image generation – 
   checked Enable explicit Ghostscript check – unchecked
 *  Thread Starter [pcoweb](https://wordpress.org/support/users/pcoweb/)
 * (@pcoweb)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-9940481)
 * I realized you were asking if I uploaded several images at one time.
 * When MLA is activated, no thumbnails are generated for four pdf files
    When MLA
   is deactivated, all thumbnails are generated for the same pdf files.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-9940485)
 * Thanks for your prompt response and the additional details. Thanks as well for
   your thorough and ongoing detective work. Regarding your points:
    1. I will try updating to 4.0.27 on my development system.
    2. The Trac system is a website where WordPress issues are reported and tracked.
       You can find it at [https://core.trac.wordpress.org/](https://core.trac.wordpress.org/).
       You can see one of the PDF tickets at [https://core.trac.wordpress.org/ticket/31050](https://core.trac.wordpress.org/ticket/31050).
    3. You can find the MLA settings in the `/wp-content/mla-backup/` directory. Each
       export creates a `.txt` file with settings encoded in the PHP “serialized” format.
 * You didn’t say which upload method you are using. Do you use the Media/Add New(
   Upload New Media) screen, the Upload Files tab in the Media Manager Modal Window
   or the drag & drop support in the Media/Library Grid view? I’ve tested the Media/
   Add New (Upload New Media) screen, but the problem might be with another method.
   If you haven’t already done it, give the Upload New Media screen a try.
 * You might also try disabling the MLA enhancements for the method you’re using.
   Go to the Settings/Media Library Assistant General tab and scroll down to the“
   Media/Add New Enhancements” and “Media Manager/Media Grid Enhancements” sections.
   Uncheck the appropriate “Enable…” box(es) and see if the problem goes away.
 * Thanks for your help and your persistence with these experiments.
 *  Thread Starter [pcoweb](https://wordpress.org/support/users/pcoweb/)
 * (@pcoweb)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-9941341)
 * On a test site, I turned off all plugins except for MLA. I set the theme to twenty
   seventeen. I turned OFF all settings under
    Media/Edit Media Enhancements Media/
   Add New Enhancements Meida/Media Grid Enhancements I tried uploading via the 
   multifile interface and also via the browser uploader with the same results. 
   When the MLA plugin was activated, no thumbnail is generated with either upload
   method. When MLA is deactivated, the thumbnail is generated. My test site is 
   running php 7.0.22-0ubuntu0.16.04.1 Not sure if my settings file would be helpful,
   but I see it now.
 *  Thread Starter [pcoweb](https://wordpress.org/support/users/pcoweb/)
 * (@pcoweb)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-9941368)
 * Also, I tried turning on logging debugging, but nothing was logged,
    define( ‘
   WP_DEBUG’, true ); define( ‘WP_DEBUG_LOG’, true );
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-9950282)
 * Thanks for your updates with the additional information and for your experiments.
 * I updated my system to PHP 7.0.27 and thumbnail generation still works for me,
   which doesn’t really surprise me.
 * You wrote “**_I tried uploading via the multifile interface and also via the 
   browser uploader_**” – I understand that to mean you are using the Media/Add 
   New (Add New Media) admin screen; is that right?
 * Since MLA thumbnail generation works (except for the directory bug; see below)
   I assume you have installed both Ghostscript and Imagick/ImageMagick. To confirm
   that, make sure no warning messages appear below the “Enable thumbnail substitution”
   checkbox on the Settings/Media Library Assistant Shortcodes tab. Check the “Enable
   explicit Ghostscript check” box to get the most complete testing.
 * Since you know how to find the error_log, I suggest you turn on some MLA debugging
   that might yield more information:
    1. Navigate to the Settings/Media Library Assistant Debug tab.
    2. Enter “0xF” in the MLA Reporting text box. That activates MLA debug logging 
       for the thumbnail generation logic (plus a few other categories).
    3. Click the “Save Changes” button to record the new setting.
 * Once that’s done, re-run your experiment and see if anything shows up in the 
   log.
 * I have found and fixed the MLA defect you reported in your first post; thanks
   again for alerting me to it. I have uploaded a new MLA Development Version dated
   20180126 with the updated code. To get the Development Version, follow the instructions
   in this earlier topic:
 * [504 Time-Out issue](https://wordpress.org/support/topic/504-time-out-issue/#post-9632199)
 * Skip down to the “To get…” instructions. You can ignore the example plugin instructions.
 * It would be great if could install the Development Version and see how it works
   for you. I don’t believe it will solved the WordPress generation failure but 
   it should give you a way to generate the thumbnails you need.
 * Thanks for your patience and persistence. I look forward to more information 
   so I can continue my investigations.
 *  Thread Starter [pcoweb](https://wordpress.org/support/users/pcoweb/)
 * (@pcoweb)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-9961341)
 * Thank you. I am able to generate the thumbnails, but they are not automatically
   generated. Here is some more information.
 * On production site
    Using the patched plugin 20180126 (Thank you for fixing the
   path bug!) Set MLA debugging to 0xF. Media>Add new You are using the multi-file
   uploader. Problems? Try the browser uploader instead. Debug.log removed. Continue
   with multi-file uploader. No thumbnail generated. Debug report: [11-Feb-2018 
   02:39:46 UTC] 36 MLA_Ajax::initialize( true ) $_REQUEST = array ( ‘interval’ 
   => ’60’, ‘_nonce’ => ‘13145c4695’, ‘action’ => ‘heartbeat’, ‘screen_id’ => ‘media’,‘
   has_focus’ => ‘true’, ) [11-Feb-2018 02:39:58 UTC] 591 MLACore::mla_plugins_loaded_action()
   MLA 2.70 (20180207) mla_debug_level 0xF [11-Feb-2018 02:40:02 UTC] 1114 MLA::
   mla_process_bulk_action request = array ( ‘tax_input’ => array ( ‘attachment_category’
   => array ( 0 => ‘0’, ), ‘attachment_tag’ => ”, ), ‘tax_action’ => array ( ‘attachment_category’
   => ‘add’, ‘attachment_tag’ => ‘add’, ), ‘post_title’ => ”, ‘post_excerpt’ => ”,‘
   post_content’ => ”, ‘image_alt’ => ”, ‘post_parent’ => ”, ‘post_author’ => ‘-
   1’, ‘comment_status’ => ‘-1’, ‘ping_status’ => ‘-1’, ‘page’ => ‘media-new.php’,‘
   screen’ => ‘async-upload’, ‘cb_attachment’ => array ( 0 => 3915, ), ‘mla_bulk_action_do_cleanup’
   => false, ) [11-Feb-2018 02:40:02 UTC] 958 MLA::mla_prepare_bulk_edits( 3915 )
   tax_input = array ( ‘attachment_category’ => array ( 0 => ‘0’, ), ‘attachment_tag’
   => ”, ) [11-Feb-2018 02:40:02 UTC] 968 MLA::mla_prepare_bulk_edits( 3915, attachment_category,
   add ) terms = array ( 0 => ‘0’, ) [11-Feb-2018 02:40:02 UTC] 968 MLA::mla_prepare_bulk_edits(
   3915, attachment_tag, add ) terms = ” [11-Feb-2018 02:40:02 UTC] 1191 MLA::mla_process_bulk_action(
   3915 ) new_data = array ( ‘tax_input’ => array ( ), ‘tax_action’ => array ( ),)[
   11-Feb-2018 02:40:02 UTC] 1198 MLA::mla_process_bulk_action( 3915 ) item_content
   = array ( ‘message’ => ‘Item 3915, no changes detected.’, ‘body’ => ”, ) [11-
   Feb-2018 02:40:02 UTC] 1292 MLA::mla_process_bulk_action returning page_content
   = array ( ‘message’ => ‘Item 3915, no changes detected.<br>’, ‘body’ => ”, ‘unchanged’
   => 1, ‘success’ => 0, ‘failure’ => 0, ‘item_results’ => array ( 3915 => array(‘
   result’ => ‘unchanged’, ‘message’ => ‘Item 3915, no changes detected.’, ), ),)[
   11-Feb-2018 02:40:04 UTC] 591 MLACore::mla_plugins_loaded_action() MLA 2.70 (
   20180207) mla_debug_level 0xF —————————————
 * Media>Assistant>select pdf>thumnail>apply>type WP (leave all boxes blank, Keep
   existing)
    Item 3913, WordPress-style thumbnail generated. ——————————– New debug
   contents: [11-Feb-2018 02:40:46 UTC] 36 MLA_Ajax::initialize( true ) $_REQUEST
   = array ( ‘interval’ => ’60’, ‘_nonce’ => ‘13145c4695’, ‘action’ => ‘heartbeat’,‘
   screen_id’ => ‘media’, ‘has_focus’ => ‘false’, ) [11-Feb-2018 02:41:46 UTC] 36
   MLA_Ajax::initialize( true ) $_REQUEST = array ( ‘interval’ => ’60’, ‘_nonce’
   => ‘13145c4695’, ‘action’ => ‘heartbeat’, ‘screen_id’ => ‘media’, ‘has_focus’
   => ‘false’, ) [11-Feb-2018 02:43:47 UTC] 36 MLA_Ajax::initialize( true ) $_REQUEST
   = array ( ‘interval’ => ’60’, ‘_nonce’ => ‘13145c4695’, ‘action’ => ‘heartbeat’,‘
   screen_id’ => ‘media’, ‘has_focus’ => ‘false’, ) [11-Feb-2018 02:43:58 UTC] 591
   MLACore::mla_plugins_loaded_action() MLA 2.70 (20180207) mla_debug_level 0xF [
   11-Feb-2018 02:44:01 UTC] 591 MLACore::mla_plugins_loaded_action() MLA 2.70 (
   20180207) mla_debug_level 0xF [11-Feb-2018 02:44:12 UTC] 591 MLACore::mla_plugins_loaded_action()
   MLA 2.70 (20180207) mla_debug_level 0xF [11-Feb-2018 02:44:13 UTC] 1114 MLA::
   mla_process_bulk_action request = array ( ‘page’ => ‘mla-menu’, ‘s’ => ”, ‘mla_search_fields’
   => array ( 0 => ‘title’, 1 => ‘content’, ), ‘mla_search_connector’ => ‘AND’, ‘
   _wpnonce’ => ‘bb1a63e787’, ‘_wp_http_referer’ => ‘/wp-admin/upload.php?page=mla-
   menu’, ‘action’ => ‘mla-generate-featured-image’, ‘m’ => ‘0’, ‘mla_filter_term’
   => ‘0’, ‘paged’ => ‘1’, ‘mla_thumbnail_options’ => array ( ‘width’ => ”, ‘height’
   => ”, ‘page’ => ”, ‘resolution’ => ”, ‘quality’ => ”, ‘type’ => ‘WordPress’, ‘
   existing_thumbnails’ => ‘keep’, ‘suffix’ => ‘-Thumbnail’, ), ‘mla-generate-thumbnail’
   => ‘Generate Thumbnails’, ‘screen’ => ‘media_page_mla-menu’, ‘cb_attachment’ 
   => array ( 0 => ‘3915’, ), ‘action2’ => ‘-1’, ‘tax_input’ => array ( ), ‘mla_bulk_action_do_cleanup’
   => true, ) [11-Feb-2018 02:44:15 UTC] 1292 MLA::mla_process_bulk_action returning
   page_content = array ( ‘message’ => ‘Item 3915, WordPress-style thumbnail generated.
   <br>’, ‘body’ => ”, ‘unchanged’ => 0, ‘success’ => 1, ‘failure’ => 0, ‘item_results’
   => array ( 3915 => array ( ‘result’ => ‘success’, ‘message’ => ‘Item 3915, WordPress-
   style thumbnail generated.’, ), ), ) [11-Feb-2018 02:44:18 UTC] 591 MLACore::
   mla_plugins_loaded_action() MLA 2.70 (20180207) mla_debug_level 0xF
 *  Thread Starter [pcoweb](https://wordpress.org/support/users/pcoweb/)
 * (@pcoweb)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-9961377)
 * On my test site, there is one difference. (Not sure that all the MLA settings
   are identical) – probably not.) However, I did set debug to 0xF. I have no ghostscript
   warnings on Settings/Media Library Assistant/Shortcodes tab for this site or 
   the production site.
 * The thumbnail IS GENERATED when MLA is not activated. When MLA is activated, 
   the thumbnail is NOT generated on upload. When I follow the steps to generate
   the WP thumbnail from the MLA listing I get an error
    ERROR: Item 3901, thumbnail
   generation failed – No editor could be selected. This seems odd since the thumbnail
   works on this site when MLA is deactivated.
 *  Thread Starter [pcoweb](https://wordpress.org/support/users/pcoweb/)
 * (@pcoweb)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-9961391)
 * Whoops, I am running MLA 2.70 (20180207). I followed the link for 20180126, but
   it gave me the 20180207 version.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-9963796)
 * Thanks for installing the Development Version, performing the tests and posting
   the results.
 * Using the Development Version 20180207 is fine – it contains all the fixes in
   the earlier version and some unrelated fixes as well.
 * Your debug log messages show that the MLA generation is working fine on the production
   system. It also shows that the MLA “Bulk Edit on Upload” feature is active. Have
   you tried my earlier suggestion to disable it? I wrote:
 * >  You might also try disabling the MLA enhancements for the method you’re using.
   > Go to the Settings/Media Library Assistant General tab and scroll down to the“
   > Media/Add New Enhancements” and “Media Manager/Media Grid Enhancements” sections.
   > Uncheck the appropriate “Enable…” box(es) and see if the problem goes away.
 * Disabling the “Media/Add New Enhancements” might let WordPress generation succeed.
   Give it a try and let me know if it helps.
 * On your test system the “**_ERROR: Item 3901, thumbnail generation failed – No
   editor could be selected._**” message is coming from WordPress. It means WordPress
   is unable to load the code required to generate thumbnails. Sadly, WordPress 
   does not log any information that would help diagnose the problem.
 * You can try reactivating the MLA debugging and then displaying the Settings/Media
   Library Assistant Shortcodes tab on your test system. That would log messages
   from the code that tests for GhostScript. You might also see “Ghostscript support
   is not installed.” on your test system.
 * It would be easier to pursue these tests offline, by email. If you give me your
   contact information I will send you an email address you can use to send the 
   information to me. You can use the Contact Us page at our web site:
 * [Fair Trade Judaica/Contact Us](http://fairtradejudaica.org/our-story/contact-us/)
 * I look forward to seeing the information or hearing from you. Thanks for your
   help with this unusual issue.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-10042763)
 * Thank you for your tireless efforts working with me offline to get to the bottom
   of this issue. The debug statements you added to your WordPress files showed 
   that the WordPress Imagick image editor was trying to “setImageFomat” to “JPE”,
   which failed silently and prevented thumbnail generation. MLA supports the “.
   jpe” file extension, but the older version of ImageMagick your systems are running
   does not.
 * The workaround for your systems is simple:
    1. Navigate to the Settings/Media Library Assistant Uploads tab
    2. Enter “jpe” in the search uploads text box and click “Search Uploads”
    3. Look for extension “jpe” in the results (there should be entries for jpe, jpeg
       and jpg )
    4. Hover under the thumbnail and click “Quick Edit”
    5. Check the “Inactive” box and click “Update” to record the new setting
    6. Verify the “Inactive” status for the jpe extension
 * For a longer-term fix I have added code to MLA that will move “JPG” to the head
   of the extensions list so WordPress will use it for the “setImageFormat” function.
   That fix will be available in the next MLA version.
 * I am marking this topic resolved, but please update it or let me know if you 
   have any problems or further questions regarding the above solution. Thanks again
   for all of your help with this issue and for your interest in the plugin.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘pdf thumbnails not generated php7.0’ is closed to new replies.

 * ![](https://ps.w.org/media-library-assistant/assets/icon-256x256.png?rev=973502)
 * [Media Library Assistant](https://wordpress.org/plugins/media-library-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-assistant/reviews/)

## Tags

 * [pdf](https://wordpress.org/support/topic-tag/pdf/)
 * [thumbnail](https://wordpress.org/support/topic-tag/thumbnail/)

 * 13 replies
 * 2 participants
 * Last reply from: [David Lingren](https://wordpress.org/support/users/dglingren/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/pdf-thumbnails-not-generated-php7-0/#post-10042763)
 * Status: resolved