Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
cleanup_taxonomy_image_module.patch | 9.41 KB | thePanz |
Comments
Comment #1
NancyDruWhy are you changing form element names?
Comment #2
thePanz CreditAttribution: thePanz commentedI'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?
Comment #3
NancyDruI didn't do that because they were all within the fieldset that already identified them.
Comment #4
thePanz CreditAttribution: thePanz commentedYou'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!
Comment #5
NancyDruSo 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.
Comment #6
NancyDruCommitted. You fixed the upload problem, thanks.
Comment #7
thePanz CreditAttribution: thePanz commentedOk, thank you for committing my changes.
I'll post some other fixes and cleanup later..