Thumbnails cache does not get updated

Create issue
Issue #1472 resolved
dunric created an issue

Satchmo fails to replace product's current image with a new one.

steps to reproduce:

  • from an admin interface at /admin/product/ select an existing prouct
  • in product details in Product Images change the current image with other one
  • save changes with the Save button
  • refresh product's page in any store view (product detail from product.html template or products overview in catgeory.html template)
  • the old image is still rendered intead of the new one

expected behaviour:

  • thumbnails cache has to be updated with new product's image(s) and old ones have to be deleted

As I've bit investigated this issue I think there is some inconsistency between satchmo_utils.thumbnail module using django.core.cache and sorl.thumbnail module which is automagicaly used for final cache management.

Be assured browser's cache is not the cause as it was completely cleared before page reload. On top of that, in static/cache/[hash-for-thumbnail]/ path resides the old image's thumbnail after an replacement.

I find this issue a serious flaw as without working images updating the app is near to unusable.

Curious to hear anybody else can confirm this regression.

Comments (6)

  1. dunric reporter

    After reading docs it seems Satchmo does not properly notify sorl-thumbnail about image change/deletion. Still trying to find the particular code.

  2. dunric reporter

    It looks like previous Satchmo updates to thumbnail support did messed things up. There are inconsistencies with mixed use of satchmo_utils code with sorl library. Sorl should be used indirectly by django.db.models.ImageField and through Key Value Store. Now Satchmo templates use directly sorl tag(s) like sorl.thumbnail instead of the satchmo_utils.thumbnail so it raises inconsistencies like stalled cache files, failing to update image <-> thumbnail relations etc. I've managed to partially fix this issue (image & thumbnails deletion through livesettings finally works) but find it too much time consuming. Hope someone of present devs will look into this.

  3. Chris Moffitt repo owner

    If you've started to do some of the work, post a patch or create a fork and I'll take a look at it. It's something we need to fix so if you've gotten down part of the path it would be helpful.

  4. Log in to comment