Products without image cause fatal error

The error message reads:
Fatal error: Call to a member function getFile() on a non-object in /is/htdocs/wp1135626_PKCJXYOGBF/www/somethingsomething.de/app/design/frontend/gem/default/template/catalog/product/view/media.phtml on line 66
and it’s displayed inside the content area of the single product view.
Line 66 in media.phtml reads:
$mainImageUrl = $this->helper(‘catalog/image’)->init($this->getProduct(), ‘image’, $_image->getFile())->resize($productlimagewidth, $productlimageheight);
I can’t seem to figure this out by myself; pages with product image(s) set work just fine and all three placeholders have been set in the catalog configuration menu. Maybe it’s a similar problem to this one here: http://www.ubertheme.com/question/products-wont-display-when-no-image-is-present/
Unfortunately no solution was provided as how to alter the code for it to work.
Please help! Thank you very much.

1 answer

Please login or Register to Submit Answer

Written By

Comments