• Hello,

    I’ve uploaded a TIFF image and none of my products will load in the admin panel. I receive the following error in the products table list:

    The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.

    I’m receiving the following error in my debug log:

    PHP Fatal error:  Uncaught Error: Call to undefined function imagecreatefromtif() in /httpdocs/wp-content/plugins/product-watermark-for-woocommerce/main.php:321
    Stack trace:
    #0 /httpdocs/wp-content/plugins/product-watermark-for-woocommerce/main.php(253): BeRocket_image_watermark->get_prepared_image('/var/www/vhosts...')
    #1 /httpdocs/wp-content/plugins/product-watermark-for-woocommerce/main.php(207): BeRocket_image_watermark->add_watermark_to_images('304', 'create')
    #2 /httpdocs/wp-includes/class-wp-hook.php(286): BeRocket_image_watermark->replace_image(false, '304', 'thumbnail')
    #3 /httpdocs/wp-includes/plugin.php(208): WP_Hook->apply_filters(false, Array)
    #4 /httpdocs/wp-includes/media.php(198): apply_filters('image_downsize', false, '304', 'thumbnail')
    #5 /httpdocs/wp-includes/ in /httpdocs/wp-content/plugins/product-watermark-for-woocommerce/main.php on line 321

    The issue is the dynamic function based on the mimetype. While I agree that TIFF images probably shouldn’t be uploaded at all, I think a check here against the either the plugins acceptable mimetypes or against whether the function exists at all is a necessary precaution to prevent admin products becoming unreachable.

    – – – – – – – – –

    Deleting the image does solve the immediate issue but not the underlying one described above.

Viewing 1 replies (of 1 total)
  • Plugin Author Dmytro Holovnia

    (@dholovnia)

    Hello,

    Thank you for the message and detailed explanation.

    Yes, we did miss there such thing and fix will be added in next plugin release.

    Regards,
    Dima

Viewing 1 replies (of 1 total)
  • The topic ‘Fatal Plugin Error – get_prepared_image() Dynamic Function’ is closed to new replies.