New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thumbnail not linked to source image in key value store #316
Comments
Are there any updates on this? Can anyone explain why one of the images is not connected to the source file in the key value store? I would love to help fix this, but I need a pointer on where to start! |
I digged a little in the code and it seems there is a problem with the function This is the situation:
There is already an entry in the KV store (Postgres database) with these parameters (B):
This is the problem: The new version of the entry (B) is never saved to the database. If I change the image only one of the thumbnails is updated, the other one stays the same, because it is not referenced by the I hope I have described the problem so one of the maintainers can reproduce the problem. Would be great if you could help me fixing this! Thank's! |
I`m not alone :) Please, merge this fix, it is very necessary! |
I observed following behavior:
My page has two calls to the
{% thumbnail %}
template tag each requesting a thumbnail of the same source image in another size. Like this:(the calls are made from different Django templates)
If sorl-thumbnail can not find the thumbnails it will create them as expected. But one of the thumbnails is not referenced in the
sorl-thumbnail||thumbnails||xxx
entry in the key value store.After the page is rendered the key value store looks like this:
Why is one of the images not connected to the source file? Is this behavior intentional? (Because I think this is causing thumbnails not being deleted when calling
sorl.thumbnail.delete
.)I am using
sorl-thumbnail==11.12.1b
This is the Django log of creation of the thumbnails:
Log getting/creating 1st thumbnail:
Log getting/creating 2nd thumbnail:
The text was updated successfully, but these errors were encountered: