Jump to content

[SOLVED] Huge question images in the BO where the flag image was before


aliaspt

Recommended Posts

So, I just went through a painful process of generating htaccess file and enabling friendly url. The friendly url is working for the products I have entered, but now I'm getting these big question images against every line in the BO where the little flag was before, and in the front end, it says "No image available" for subcategories. There were no images there before, so that's weird. I have attached screenshots for better understanding. Any ideas what I've done wrong? Thanks!

30205_WVT1AxqLCI0VIQuidKNQ_t

Link to comment
Share on other sites

OK, that wasn't all... I also found that some images I inserted look like question marks and the path it's showing isn't the actual one. It actually doesn't exist! (/content/themes/mytheme/img/...) I don't see "content" folder in the PrestaShop folder. In the BO, though, everything looks correct and the images show up properly. People, help please!!!

Link to comment
Share on other sites

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /shop/img/p/$1-$2$3.jpg [L,E]
RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /shop/img/p/$1-$2.jpg [L,E]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /shop/img/c/$1$2.jpg [L,E]
RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /shop/product.php?id_product=$3&isolang;=$1$5 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /shop/product.php?id_product=$2&isolang;=$1$4 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /shop/category.php?id_category=$2&isolang;=$1 [QSA,L,E]
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /shop/product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /shop/product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /shop/category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /shop/cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /shop/supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /shop/manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
RewriteRule ^lang-([a-z]{2})/(.*)$ /shop/$2?isolang=$1 [QSA,L,E]

# Catch 404 errors
ErrorDocument 404 /shop/404.php

Link to comment
Share on other sites

Ok this doesnt have anything to do with the htaccess i was mistaken.

The sub categories missing images is because by default prestashop expects to have an image there.

In the category.tpl file which is located in your theme folder look for the following code:

    {if isset($subcategories)}
   <!-- Subcategories -->

{l s='Subcategories'}

       {foreach from=$subcategories item=subcategory}

getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}">
                   {if $subcategory.id_image}
getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" />
                   {else}

                   {/if}



getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}

       {/foreach}




   {/if}



and change it to

   {if isset($subcategories)}
   <!-- Subcategories -->

{l s='Subcategories'}

       {foreach from=$subcategories item=subcategory}

getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}">


getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}

       {/foreach}




   {/if}



this will remove the sub category image box. If you need to add the images back in you will need to restore the original file to your server .

As for the image on the cms page, did you add this image yourself when you created the cms page? If you did the url to the image is incorrect. The /content/ folder is created by presta for the cms pages, so it wont ever be visible in the folder structure on the server.

Link to comment
Share on other sites

Thank you, John, but it's not working. =( I changed the code like you said and it swept the whole page away.

As for images in the CMS page, they were showing up just well for several days, but after I activated htaccess and friendly url, it got messed. How can I make the images show up again?

Thanks!

Link to comment
Share on other sites

OK, issue with the flag/question mark fixed (I deleted the flag (1.jpg) so that it doesn't show up on the front end, and messed it in the back office).
Issue with the question marks instead of images fixed as well (here was the answer to this problem http://www.prestashop.com/forums/viewthread/53402/)

Third issue with the subcategory images is solved as well using information here http://www.prestashop.com/forums/viewthread/53539/general_discussion/solved_how_to_remove_images_of_the_subcategories_
Thanks everyone!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...