Jump to content

Major issue! "Home" product images not showing when using friendly URLs


Recommended Posts

Hello,

 

Using PrestaShop 1.4.9.0. After activating friendly URLs, the "home" image version for products that has no image, are not showing. That is, the default "no image" is not appearing in the listings (where "home" version of the image should appear), but if I enter the product I can see the "thickbox" version of the "no image" image without problem.

 

Any idea? I've regenerated .htaccess file, robots.txt file, etc. If I deactivate "SEO friendly URLs" it works, so it seems to be a problem with the .htaccess file itself.

 

This is my .htaccess file. Thanks in advance.

 

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# WARNING: PLEASE DO NOT MODIFY THIS FILE MANUALLY. IF NECESSARY, ADD YOUR SPECIFIC CONFIGURATION WITH THE HTACCESS GENERATOR IN BACK OFFICE
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
# URL rewriting module activation
RewriteEngine on
# URL rewriting rules
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$1$2.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L]
RewriteRule ^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$ /img/c/$1.jpg [L]
RewriteRule ^c/([0-9]+)/[a-zA-Z0-9-]+\.jpg$ /img/c/$1.jpg [L]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]
RewriteRule ^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*(/[a-zA-Z0-9-]*)+ /category.php?id_category=$1&noredirect=1 [QSA,L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /category.php?id_category=$1 [QSA,L]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*) /supplier.php?id_supplier=$1 [QSA,L]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*) /manufacturer.php?id_manufacturer=$1 [QSA,L]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms=$1 [QSA,L]
RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms_category=$1 [QSA,L]
RewriteRule ^pagina-no-encuentra$ /404.php [QSA,L]
</IfModule>
# Catch 404 errors
ErrorDocument 404 /404.php
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
</IfModule>
FileETag INode MTime Size
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
 AddOutputFilterByType DEFLATE text/html text/css text/plain text/javascript application/javascript application/x-javascript
</IfModule>
</IfModule>

Link to comment
Share on other sites

Hi Vekia,

 

This is an example URL: http://www.storeurl.com/es-default-home/friendly-url.jpg, where it should be something like http://www.storeulr.com/img/p/es-default-home.jpg

 

Regarding the theme, it doesn't work with the default theme or our premium theme. It's something we test everytime we have an issue, to test with the default theme. No luck.

 

Sorry about the link to the store. It's not opened yet (something asked by our customer).

 

Thanks.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

Sorry, I found my problem. It was related with a style I added for the front page that was affecting other pages. So, basically it's not related with your problem Vekia, I'm afraid...

 

Same problem here, Vekia... I can see the products are there if you see the source code. Can you check if you also see the products in the page source?

 

Please post here your solution if you found it...

 

Thanks,

 

Jose.

 

Hi Vekia,

 

Any ideas? The issue is not resolved... Anyone else?

Edited by prestaden (see edit history)
Link to comment
Share on other sites

I'm afraid I haven't still resolved...and no answers at all from the community. This is really frustrating.

 

Did you tried to create new position in Preferences -> Images section with the same sizes as unavailable image? Next you can change tpl files for displaying your new "home" image

 

 

I know that this isn't solution, but maybe it works for you, maybe something goes wrong when image is named as "home"

Link to comment
Share on other sites

@vekia I've tried, but the same problem. I've tried with "anothertag" for the new kind of image, and the URL is the same:

 

http://www.interneumaticos.es/es-default-anothertag/bridgestone-205-55r16-91v-er300-.jpg

http://www.interneumaticos.es/es-default-home/bridgestone-205-55r16-91v-er300-.jpg

 

As you see, for both "anothertag" and "home" image types, the URL is the same.

Link to comment
Share on other sites

I have had reports of this happening on my site as well. I have not had it happen on my own computer but my friend has tried 4 different computers and various browsers on all computers. Simply refreshing the page will make the images appear.

 

The site is http://gadgetcity.dk. The theme is a fork of the 1.5.0.17 default theme.

The following has been tried:

  • Regenerating thumbnails
  • Clearing cache
  • Happens in IE9,FF,Chrome

The bizarre thing is that it has never happened to me.

 

If you need more info ask away

Link to comment
Share on other sites

×
×
  • Create New...