Download & Extend

Validation problems with imagecache_ui_preset_add_form.

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.

AttachmentSizeStatusTest resultOperations
imagecache_ui.patch1.7 KBIgnored: Check issue status.NoneNone

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.

AttachmentSizeStatusTest resultOperations
imagecache_ui.patch1.72 KBIgnored: Check issue status.NoneNone

#2

Same problems in preset edit form.

AttachmentSizeStatusTest resultOperations
imagecache_ui.patch2.45 KBIgnored: Check issue status.NoneNone

#3

Status:needs review» fixed

good catches, thanks. committed to HEAD.

#4

Status:fixed» active

re-opening after #370399: The namespace you have chosen is already in use.

#5

Status:active» needs review

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.

AttachmentSizeStatusTest resultOperations
imagecache_ui.patch984 bytesIgnored: Check issue status.NoneNone

#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

Status:needs review» fixed

committed to HEAD.

#8

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here