Posted by q0rban on January 9, 2009 at 8:06pm
3 followers
| Project: | ImageCache |
| Version: | 6.x-2.0-beta5 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
In the add preset form you can enter in any name for a preset, and even enter a namespace that has already been used. It appears this is because incorrect usage of '#validate' in imagecache_ui_preset_add_form(), and incorrect usage of in_array (in_array does not recursively search for needle) in the validation function.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| imagecache_ui.patch | 1.7 KB | Ignored: Check issue status. | None | None |
Comments
#1
Oh, I guess we should make the namespace element required as well. Otherwise you can actually leave the field empty and still pass validation.
#2
Same problems in preset edit form.
#3
good catches, thanks. committed to HEAD.
#4
re-opening after #370399: The namespace you have chosen is already in use.
#5
As far as I can tell, there's really no reason for anyone to be able to edit the namespace after it's been created. I don't see anything in there handling the move of the imagecache directory that's been created. So, I just removed the textfield for the presetname and the validation call for the edit form.
#6
that seems reasonable to me. follows the views and cck pattern. and once #255421: Patch for imagecache preset exporting lands you could export it and import with a new name
#7
committed to HEAD.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.