Magento Forum

   
Page 2 of 6
Magento image placeholder showing instead of my product images
 
Ideal store
Jr. Member
 
Total Posts:  6
Joined:  2008-11-12
 

Hi Piranha,
look at your .htaccess file and your index.php and see if it points to your old website. I could solve it by removing “magento” from the rewrite statement in the .htaccess file and removing it also in the index.php from line $mageFilename = ‘Magento/app/Mage.php’; : I moved my site from the subdirectory magento to the root directory.
Good luck
Brigitte

 
Magento Community Magento Community
Magento Community
Magento Community
 
Piranha
Jr. Member
 
Total Posts:  16
Joined:  2008-11-11
 

Hi Brigitte,

thanks for your help, but the path was already correct. I don’t know what else I should try to fix this. I tried already all ideas from different threads.

:-(

But thanks!

Alex

 
Magento Community Magento Community
Magento Community
Magento Community
 
jalvarez
Jr. Member
 
Total Posts:  3
Joined:  2009-01-07
 

Hi guys, I have the same problem even in version 1.2.1.2

In my case the site is in a sub domain, I guess this should cause no problems since from magento point of view, it is in the root of the web site, but I have my doubts since the subdomain actually is a folder inside the main site ( public_html/my_subdomain ).

I tried cleaning the cache, giving proper rights to folders, checking and rechecking .htaccess and index.php, also php modules are ok, but no luck :( I’m frustrated and Im sure it must be a very silly configuration issue.

It would be great that someone from the Magento team could give us a hand, since internally, magento is not finding the product images, and then it decides to give the placeholder image instead. Such desicion is made internally in php, otherwise we should have an empty square with a red cross in the final page.

If anyone makes any progress or finds anything relevant, please post!!!

bye bye
Juan

 
Magento Community Magento Community
Magento Community
Magento Community
 
jalvarez
Jr. Member
 
Total Posts:  3
Joined:  2009-01-07
 

Found a solution for the problem.

Magento performs a memory check, if there is not enough, it gives the placeholder image, I just commented out the memory limit and images are being shown now.

magento\app\code\core\Mage\Catalog\Model\Product\Image.php

near line 240, in function setBaseFile($file)

Also added some log to get to the real problem.

if ($file{
            
if ((!file_exists($baseDir $file)) /*|| !$this->_checkMemory($baseDir . $file)*///   <- Note the commented out code
                
$file null;
                
Mage::log('2.5) No existe o no hay memoria  para: ' $baseDir $file); 
                
Mage::log('file_exists($baseDir . $file)         = ' file_exists($baseDir $file)); 
                
Mage::log('$this->_checkMemory($baseDir . $file) = ' $this->_checkMemory($baseDir $file)); 
            
}
        }

I guess that my cheap hosting provider wont give me more than 32MB for my php scripts.

NOTE: Removing such memory limit check may cause the site not to work properly, it would be great to from magento guys how much memory is needed for a standard site, because I can tell 32MB as they say is not enough at all.

bye bye
Juan

 
Magento Community Magento Community
Magento Community
Magento Community
 
Christoph_dp
Jr. Member
 
Total Posts:  1
Joined:  2009-02-02
 

Thanks for your valuable info!

The check for memory went wrong for my Installation (1.3.0) as well. phpinfo() shows me a memor ylimit of 256mb which should be more than enough. When modifiyng the core code the images show up.

This is likely a core bug that probably does not show up on all but only some systems smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
ravin123
Jr. Member
 
Total Posts:  1
Joined:  2009-03-30
 

Hello,
I m also facing same problem i have tried
“ jalvarez” solution but its not working for me…
I m using magento version 1.3..
In “jalvarez” i have tested some variables and i found that image path is not set while initializing the product class..Till now i m trying to trace the problem..
If u find anything pleas let me know..
Thanx

 
Magento Community Magento Community
Magento Community
Magento Community
 
dannze
Jr. Member
 
Total Posts:  1
Joined:  2009-04-07
 

sorry.. wrong post..

 
Magento Community Magento Community
Magento Community
Magento Community
 
chocololitta
Jr. Member
 
Total Posts:  22
Joined:  2008-07-26
Franklin, TN
 

Same problem… jalvarez solution didn’t work for me either… any other answers out there??

 
Magento Community Magento Community
Magento Community
Magento Community
 
Wooks
Jr. Member
 
Total Posts:  5
Joined:  2008-08-17
 

Hi, I had the same problem after using the wiki tutorial to move my magento installation to another folder/host. The problem was that the backup media folder (all my old site’s product images) got unzipped inside the new installation’s media folder and not in the root. Basically it means that the correct media folder (with all the images) was one directory too deep and everything reverted to Magento’s placeholder images.
Check your directory structure and if you see a media folder inside your media folder then that could be the problem. (To fix just move its contents one folder up).

 
Magento Community Magento Community
Magento Community
Magento Community
 
jackcobain
Jr. Member
 
Total Posts:  25
Joined:  2009-04-05
 

Hello guys,

i just solved the problem that we all are facing. smile hope it will help you all.

file is -> app/code/core/mage/catalog/model/product/image.php

around the line 274: there is an array

$path = array(
Mage::getSingleton(’catalog/product_media_config’)->getBaseMediaPath(),
‘cache’,
Mage::app()->getStore()->getId(),
$path[] = $this->getDestinationSubdir()
);

put below code instead of above

$path = array(
Mage::getSingleton(’catalog/product_media_config’)->getBaseMediaPath(),
‘’,
Mage::app()->getStore()->getId(),
$path[] = $this->getDestinationSubdir()
);

and it will start working smile

let me know your response.

Cheers,
jackcobain

 
Magento Community Magento Community
Magento Community
Magento Community
 
jackcobain
Jr. Member
 
Total Posts:  25
Joined:  2009-04-05
 

Hello guys,

i just solved the problem that we all are facing. smile hope it will help you all.

file is -> app/code/core/mage/catalog/model/product/image.php

around the line 274: there is an array

$path = array(
Mage::getSingleton(’catalog/product_media_config’)->getBaseMediaPath(),
‘cache’,
Mage::app()->getStore()->getId(),
$path[] = $this->getDestinationSubdir()
);

put below code instead of above

$path = array(
Mage::getSingleton(’catalog/product_media_config’)->getBaseMediaPath(),
‘’,
Mage::app()->getStore()->getId(),
$path[] = $this->getDestinationSubdir()
);

and it will start working smile

let me know your response.

Cheers,
jackcobain

 
Magento Community Magento Community
Magento Community
Magento Community
 
jackcobain
Jr. Member
 
Total Posts:  25
Joined:  2009-04-05
 

Hello guys,

i just solved the problem that we all are facing. smile hope it will help you all.

file is -> app/code/core/mage/catalog/model/product/image.php

around the line 274: there is an array

$path = array(
Mage::getSingleton(’catalog/product_media_config’)->getBaseMediaPath(),
‘cache’,
Mage::app()->getStore()->getId(),
$path[] = $this->getDestinationSubdir()
);

put below code instead of above

$path = array(
Mage::getSingleton(’catalog/product_media_config’)->getBaseMediaPath(),
‘’,
Mage::app()->getStore()->getId(),
$path[] = $this->getDestinationSubdir()
);

and it will start working smile

let me know your response.

Cheers,
jackcobain

 
Magento Community Magento Community
Magento Community
Magento Community
 
rwone
Sr. Member
 
Total Posts:  174
Joined:  2009-02-12
 

thanks for your suggestion jackcobain, i tried it but it didnt have any effect. 

i thought perhaps the image files were too large so i resized them (filesize wise) and re-uploaded them and re-imported the csv with references to my images.

no banana :(

some images show and some dont. 

(note: i dont think system likes JPG or JPEG file extension - has to be lowercase...i fixed this but still have problem :( )

 
Magento Community Magento Community
Magento Community
Magento Community
 
rwone
Sr. Member
 
Total Posts:  174
Joined:  2009-02-12
 
jalvarez - 27 March 2009 01:01 PM

NOTE: Removing such memory limit check may cause the site not to work properly, it would be great to from magento guys how much memory is needed for a standard site, because I can tell 32MB as they say is not enough at all.
bye bye
Juan

Hi Juan,

Thanks for the suggestion, i tried this and it produced this error:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1852 bytes) in /home/***/public_html/store/lib/Varien/Image/Adapter/Gd2.php on line 44

Going to ask my host to look into it…

 
Magento Community Magento Community
Magento Community
Magento Community
 
sinbad
Jr. Member
 
Total Posts:  8
Joined:  2009-03-10
 

This is very frustrating. I’ve tried both suggestions and nothing seems to solve this.
Can’t we get some good advice from the Team maybe?
It’ll be really sad if people won’t be able to use Magento because of such small issue. a store without images is like computer without internet.
please help.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 2 of 6