Project:Taxonomy Image
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I found some errors in TI module (in logic and code):

- upload directories created/checked more than once
- called taxonomy_image_delete() more than once in a single code flow
- TI cache flushed more than once in a single code flow (like above)
- wrong parameter for t() in external link check ( '@where' => @where)
- wrong (not working) call to file_save_upload(): first parameter must be a file field, "path" given instead

It's a *huge* and deep patch, with a lot of changes.
Please review.

AttachmentSize
cleanup_taxonomy_image_module.patch9.41 KB

Comments

#1

Status:needs review» needs work

Why are you changing form element names?

#2

I'm changing form elements names for better inter-operability with other hook_form() calls: each form element have a "module name" prefix like functions names and variables names.
Is it a wrong idea?

#3

I didn't do that because they were all within the fieldset that already identified them.

#4

You're right, but take the case of an external "validator" function in another module, it will receive, in $form_values, only the form element name, and not the entire form-tree.

What do you think about other changes in my patch?
Regards, and thank you for your replies!

#5

So far the only problem I see is that it says "Image upload failed" when all I do is to delete an image without adding a new one. That problem was probably already there. I fixed it.

#6

Status:needs work» fixed

Committed. You fixed the upload problem, thanks.

#7

Ok, thank you for committing my changes.
I'll post some other fixes and cleanup later..

#8

Status:fixed» closed (fixed)

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

nobody click here