2

Since I've migrated Magento 1.7 to 1.9 some images doesn't show up. I found that the ones who doesn't show up are those with uppercase letters in url and when I manually insert lowercase letters, the image show up.

What can I do?

Thank you very much.

6

2 Answers 2

3

First, thanks to R.S to help me found the latest piece to resolve my puzzle.

To solve this problem:

  1. Make a php script to put your files in lowercase (sorry isn't recursive so you will need to make it folder by folder)

    <?php 
    
    // The directory that contains the files that you want to rename to lowercase 
    $directory = "/public_html/media/catalog/product/s/t/"; 
    
    $conn = ftp_connect("website"); 
    ftp_login($conn,"username","password"); 
    
    ftp_pasv($conn,true); 
    
    ftp_chdir($conn,$directory); 
    $dir = ftp_nlist($conn,"."); 
    
    foreach($dir as $fsObject) 
    { 
        if($fsObject != "." || $fsObject != "..") 
        { 
            if($fsObject != strtolower($fsObject)) 
            { 
                ftp_rename($conn,$fsObject,strtolower($fsObject)); 
                echo strtolower($fsObject)."<br>";
            } 
        } 
    } 
    
    ftp_close($conn); 
    echo $directory."<br>";
    echo "Finish!";
    
    ?>
    
  2. Run these SQL queries: update catalog_product_entity_media_gallery set value = lcase(value) where lcase(value) like '%.jpg'; update catalog_product_entity_varchar set set value = lcase(value) where lcase(value) like '%.jpg';

  3. Clean your images cache in Cache Management

1

My only advice is to double and triple check that you've flush all caches possible (Magento Cache, System Cache, and all 8 caches along with media cache). If you're using Zend Full Page cache, empty that too. Go to /var/cache and delete everything in here and do the same in var/sessions (if you're storing sessions in the file system and not the database).

If all of that fails try using a different browser that you have yet to view the site on. If that fails try uploading a fresh copy of your version of magento, replacing all the core files. I've seen crazy things happen with Magento and a upload of a clean copy fixes problems for whatever reason. Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.