Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Getting error in media file
 
chrismmmmm
Jr. Member
 
Total Posts:  7
Joined:  2011-01-11
 

Getting an error in my system.log from my product pages:

Missing argument 1 for Mage_Catalog_Helper_Image::resize(), called in /chroot/home/.../app/design/frontend/default/respond/template/catalog/product/view/media.phtml on line 45 and defined in /chroot/home/.../app/code/core/Mage/Catalog/Helper/Image.php on line 177

its something to do with my thumbnail images and including a size in my getFile())->resize();

we are using a galleria lightbox and slider for the main images - so my media file looks like this:

<?php
    $_product 
$this->getProduct();
    
$_helper $this->helper('catalog/output');
?>
    <?php
        $_img 
'<img src="'.$this->helper('catalog/image')->init($_product'image')->resize().'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
        echo 
$_helper->productAttribute($_product$_img'image');
    
?>
    <?php 
if (count($this->getGalleryImages()) > 1): ?>
    <?php 
foreach ($this->getGalleryImages() as $_image): ?>
          
       
           
<img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->resize(); ?>" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>" />
           
           
      
           
    
<?php endforeach; ?>
    <?php 
endif ?>
<script type="text/javascript">
//<![CDATA[
       // Initialize Galleria
$j('#galleria').galleria({
    responsive
true,
    
lightboxtrue,
    
swipetrue
}
);
//]]>
</script>

any help on getting this error to go would be much appreciated! -

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top