After creating a product with images, I am getting the following issue:
Error Log:
PHP Fatal error: Call to a member function open() on a non-object in /var/www/html/app/functions/fn.images.php on line 635, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP Stack trace:, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 1. {main}() /var/www/html/admin.php:0, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 2. fn_dispatch() /var/www/html/admin.php:27, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 3. Tygh\\SmartyEngine\\Core->display() /var/www/html/app/functions/fn.control.php:611, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 4. Smarty_Internal_TemplateBase->display() /var/www/html/app/Tygh/SmartyEngine/Core.php:52, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 5. Tygh\\SmartyEngine\\Core->fetch() /var/www/html/app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:394, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 6. Smarty_Internal_TemplateBase->fetch() /var/www/html/app/Tygh/SmartyEngine/Core.php:68, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 7. content_55fcaa44d5b4e6_74786694() /var/www/html/app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:188, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 8. Smarty_Internal_Template->getSubTemplate() /var/www/html/var/cache/templates/backend/b7653ad23fbf3b58e8f2d99ec0214681ac8cffda.tygh.index.tpl.php:81, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 9. Smarty_Internal_TemplateBase->fetch() /var/www/html/app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:304, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 10. content_55fcac050e80e7_63702130() /var/www/html/app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:188, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 11. Smarty_Internal_Template->getSubTemplate() /var/www/html/var/cache/templates/backend/86b97ab2ecd36a14d58371d2b8b0ccc520293b3c.tygh.manage.tpl.php:194, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 12. Smarty_Internal_TemplateBase->fetch() /var/www/html/app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:304, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 13. content_55fcb1e03d7071_99745455() /var/www/html/app/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:188, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 14. fn_image_to_display() /var/www/html/var/cache/templates/backend/30cb74cec3a2175b314961ef6ca3beb0fceec881.tygh.image.tpl.php:34, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 15. fn_generate_thumbnail() /var/www/html/app/functions/fn.images.php:949, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1 PHP 16. fn_resize_image() /var/www/html/app/functions/fn.images.php:871, referer: http://[REDACTED]/admin.php?dispatch=products.update&product_id=1
Every time I try to go to the products page, the page is broken (see attachment).
Also on the storefront, I am getting the store_closed.html page (because of the above error).
The line in question (app/functions/fn.images.php):
function fn_resize_image($src, $new_width = 0, $new_height = 0, $bg_color = '#ffffff', $custom_settings = array()) { static $general_settings = array(); if (empty($general_settings)) { $general_settings = Settings::instance()->getValues('Thumbnails'); }gc_collect_cycles(); $settings = empty($custom_settings) ? $general_settings : $custom_settings; /** @var \Imagine\Image\ImagineInterface $imagine */ $imagine = Tygh::$app['image'];
Note: I installed php5-gd, is there something else that I'm missing?
Thanks!