If one does not enter one of the required fields in the create zen subtheme form, an error message saying that the required field should be filled out appears. But the directory is still created so that next time one tries to create the subtheme, an error saying that the directory already exists.

Small patch to check for form errors before creating directories.

CommentFileSizeAuthor
validation_check.patch885 bytesnaxoc

Comments

Garrett Albright’s picture

Hm? The form validate function shouldn't be being called if required fields are left blank. I just double-checked and couldn't get this to happen on my end… Maybe I'm misunderstanding the circumstances in your post?

naxoc’s picture

Hmm. I get the problem when I dont fill out the description field.

I think that form validation code does not stop execution when finding errors. It willl not sumbit though. It sets the error on the form array and the validators implemented will have to check that array.

Garrett Albright’s picture

My bad; you're right. I was testing by putting dsm() functions in my validate function and wasn't seeing anything, but it turns out I was editing and testing different copies of the module code. So this is a bug. Thanks for bringing it to my attention.

Garrett Albright’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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