6.0.0-RC7
6/18/26

[#10645] picture leftover after delete
Summary picture leftover after delete
Queue Ansel
Queue Version 2.0-ALPHA1
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester michael (at) bigmichi1 (dot) de
Created 10/13/11 (5362 days ago)
Due
Updated 10/20/11 (5355 days ago)
Assigned 10/19/11 (5356 days ago)
Resolved 10/20/11 (5355 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
434 Michael Rubinsky State ⇒ Resolved
 
477 michael (at) bigmichi1 (dot) de Comment #18 Reply to this comment
changing to png solved the issues about not rotating the pics and also 
when deleting the picture
495 Michael Rubinsky Comment #17
State ⇒ Feedback
Reply to this comment
I'm pretty sure that what happened to you was due to an error in the 
way the gallery style properties were saved when using JPG images and 
a transparent gallery background color.

The property screen has been changed so it now disallows saving 
combinations of values that would be unsupported when using JPG images.

Please let me know if this solves the issue for you (in a newly 
created gallery).
15 Git Commit Comment #16 Reply to this comment
Changes have been made in Git for this ticket:

Provide some verification and feedback if the style selection is not 
supported with the current image type.
Related to Bug: 10645

  2 files changed, 24 insertions(+), 4 deletions(-)
http://git.horde.org/horde-git/-/commit/cc96f9466681fea83395d42f5a384180b56594dc
423 Michael Rubinsky Comment #15
State ⇒ Assigned
Reply to this comment
Tracked this down to the fact that you are using JPG images.  Since 
JPG images cannot have a transparent background, choosing a background 
of 'none' causes Ansel to revert back to the "Plain" thumbnail type.

We need to provide better UI clues, filtering to reflect this.
507 michael (at) bigmichi1 (dot) de Comment #14 Reply to this comment
when i create/edit i can select other thumbnail styles from dropdown 
but when i reopen the properties it shows everytime Basic Thumbnails, 
that's right. i my logs with log level DEBUG i only found some 
messages about missing permission for ansel:admin.
433 Michael Rubinsky Comment #13
State ⇒ Feedback
Reply to this comment
Ok, so to recap:

When you create/edit a gallery you are unable to select anything other 
than "Basic Thumbnails" for the Thumbnail style and that is causing 
the ansel_hashes table to not be populated. Is this correct?

I assume you have checked the horde/server logs for errors? I cannot 
reproduce this...
175 michael (at) bigmichi1 (dot) de Comment #12 Reply to this comment
as imagedriver i use:

pecl.php.net        imagick         3.1.0RC1 (beta)
611 Michael Rubinsky Comment #11 Reply to this comment
i did a little bit of basic  debugging and added some 
Horde::debug("LOG") to both methods that read and write 
ansel_hashes. i added a picture and nothing were logged.
The hash is written when the gallery is created or the style 
attributes for the gallery are changed, not when the image is 
created/saved.

  so i looked where the
methods are called and found a place in Gallery.php -> getKeyImage() 
and here it never goes into the second if where ensureHash is called.
The hash computed for getKeyImage is there because the "stack" images 
may have a different style hash then that of the gallery. If it's 
never getting called in that method, then you are not using one of the 
"pretty" image stacks.
so i played around with both style settings for that gallery were i 
upload my test pictures to. but no change. i only noticed that i 
can't set another preview style, after choosing another than "simple 
preview" and save and reopen properties it's still "simple preview"
This might be the issue. It could be that your image backend does not 
support generating these images (so the style hash for them would 
never need to be computed). Though, if that is the case, the image 
would not have been generated to begin with...unless you changed your 
image backend from one that *does* support them (like ImageMagick) to 
one that does not (like GD).
519 Michael Rubinsky Comment #10 Reply to this comment
What image driver is Horde configured to use? e.g., ImageMagick, 
Imagick, GD...?
553 michael (at) bigmichi1 (dot) de Comment #9
New Attachment: conf.php.txt Download
Reply to this comment
here is my conf.php, perhaps that also helps to solve the problem
563 michael (at) bigmichi1 (dot) de Comment #8 Reply to this comment
i did a little bit of basic  debugging and added some 
Horde::debug("LOG") to both methods that read and write ansel_hashes. 
i added a picture and nothing were logged. so i looked where the 
methods are called and found a place in Gallery.php -> getKeyImage() 
and here it never goes into the second if where ensureHash is called. 
so i played around with both style settings for that gallery were i 
upload my test pictures to. but no change. i only noticed that i can't 
set another preview style, after choosing another than "simple 
preview" and save and reopen properties it's still "simple preview", 
perhaps that is the problem in my case that i need to choose another 
preview style to get hashes working and than also pictures were all 
deleted.
but if this is the case that the pictures in the hash directory are 
only needed for some styles other than simple preview, than the 
question is why are they generated and saved so that they are not 
deleted when deleting a picture
365 michael (at) bigmichi1 (dot) de Comment #7 Reply to this comment
this is a complete fresh install of ansel no migration from horde 3.x
3111 Michael Rubinsky Comment #6
State ⇒ Assigned
Reply to this comment
It looks like this might happen when upgrading from an existing Ansel install.

Did you update from an existing Ansel install or is this a new 
install? It looks like the migration doesn't create the hash for 
existing gallery styles when upgrading...
538 michael (at) bigmichi1 (dot) de Comment #5 Reply to this comment
any chance to give some hints what i have to look for when it is not 
ok that ansel_hashes is empty?
37 Michael Rubinsky Comment #4 Reply to this comment
Cannot reproduce. All images are successfully removed when I delete an 
image. Having an empty ansel_hashes table, though, would definitely 
prevent images from being deleted. So we/you need to figure out why 
that table is empty...
224 michael (at) bigmichi1 (dot) de Comment #3 Reply to this comment
ansel_hashes is empty and in ansel_images i can't see such a string
22 Michael Rubinsky Comment #2
Assigned to Michael Rubinsky
State ⇒ Feedback
Reply to this comment
Do you see that hash string in Ansel's signature table?
466 michael (at) bigmichi1 (dot) de Comment #1
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Ansel
Summary ⇒ picture leftover after delete
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
when i delete a picture from a gallery, the picture is removed from 
full, mini and screen directory on the filesystem, but there is also a 
directory named 'c73bbb618b87e81a79e6aac7a9476a06' and there the 
picture is still present. ./ansel-garbage-collection returns only: No 
cleanup necessary.

Saved Queries