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

Upgrade from 1.4.0.1 to 1.5.0.1 $this->getProductThumbnail()->resize(75); Bug
 
Rick200SX
Jr. Member
 
Total Posts:  15
Joined:  2010-04-13
 

I have been working on this for almost two weeks now, and i can’t seem to fix the problem. After several upgrade attempts i finally got at least the admin working, but the front end doesnt work very well. Im having a strange $this->getProductThumbnail()->resize(75); bug. I tested several designs, even the stock one has this bug so there has to be something wrong with the core files. It’s strange, because i allready downloaded the complete tarball and i extracted everything from that to the root of my test webserver on my linux workstation, just to be sure every single 1.5.0.1 file is in place. Still the same problem!

The thing is that when i want to add a product to my cart, and then view it, it doesnt show the products. The pro ducts are added to the cart, but it just doesnt show them. I found out that this has something to do with the $this->getProductThumbnail function. It’s not working. Also, when im viewing a product that uses this function, im experiencing the same problem: when $this->getProductThumbnail() is called, Magento just shuts down like if u just put the exit(); commando in the script. No more code is being parsed after that. Also i aint getting any error message, also no error messages in the log files of my server.

I altered the code abit, and then i got this:

Fatal error: Class ‘Mage’ not found in /var/www/app/code/core/Mage/Core/Model/Mysql4/Session.php on line 88

Seems like the Class Mage, which is a core class, isnt loaded at all.

How can i fix this? Like i said, im busy with this for like 2 weeks now and i googled quite abit, but still no solution… I hope someone here will put me in the right direction.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

What server are you using?

What theme are you using?

 
Magento Community Magento Community
Magento Community
Magento Community
 
helmutlangmann
Jr. Member
 
Total Posts:  3
Joined:  2011-03-11
 

Also upgraded to 1.5 and this issue comes up. Also tracked it down to the $this->getProductThumbnail() function. It returns nil.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rick200SX
Jr. Member
 
Total Posts:  15
Joined:  2010-04-13
 

Im using a custom theme, but like i said, this also happens when i use the default theme.

I have worked around this issue, using a custom piece of code like this:

#echo $_item->getResource()->getAttribute(\'small_image\');
    
    $productid $_item->getProductId();
    
$model Mage::getModel(\'catalog/product\');
    
$_product $model->load($productid); //getting product object for particular
    
    
        
echo \"<img src=\\\"/media/catalog/product\";
        #echo 
$this->getProductThumbnail()->resize(75);
        echo 
$_product->getThumbnail();
        #print_r(
$_product);
        echo \"
\\\" width=\\\"75\\\" height=\\\"75\\\" alt=\\\"\";
        echo 
$this->htmlEscape($this->getProductName());
        
        echo \" 
$productid\";
        
        echo \"
\\\" />\";

But now that i got that working, i have the following problem: The tiered prices don\’t show :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
zzella
Jr. Member
 
Total Posts:  1
Joined:  2011-06-20
 

I also have the same issue. I would like to understand the reason as after Googling it doesn’t seem anybody else has the problem.

I am using the default theme and have made no changes to it. I installed Magento 1.5.0.1 along with the sample data.

When I click View Cart no items appear in the cart (even though it says there are 2 items in it).

I tracked it down to app/design/frontend/base/default/template/checkout/cart/item/default.phtml. Nothing renders after the call to $this->getProductThumbnail()->resize(75);

Can’t figure out anything beyond that (noob and pulling my hair out..)

Any help appreciated!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

Can you upgrade to 1.5.1?

Can you make sure all your core files are there?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mrbum21
Jr. Member
 
Total Posts:  2
Joined:  2011-08-05
 

I\’m also seeing this issue exactly.

Old install worked well 1.4.x new install 1.5.0.1 dies when loading any pages with product images when it goes to load said images. Will load all page content up to that point.

Using an Ubuntu server 10.04 I think.....could this be a problem with GD/Imagemagic?

A cache file permissions issue?

Help!

 
Magento Community Magento Community
Magento Community
Magento Community
 
mrbum21
Jr. Member
 
Total Posts:  2
Joined:  2011-08-05
 

Ok, so after some further Google foo it appears that my guess at GD as the issue was accurate. Seems like my problem was related to previous migration to a new server weeks before the upgrade. Having not added any new images this problem only appeared when I went to upgrade.

For Ubuntu a simple “apt-get install php5-gd” did the trick.

cheers,

ls

PS

A more useful description of the issue for Google would be Magento 1.5.x product images and thumbnails fail to load on product pages causing what look to be PHP hard-fault code errors.

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