There are a couple calls to _field_invoke() and _field_invoke_default() that are not working correctly because they are receiving the wrong parameters. We do a direct function check based on the $op value such as this:
$function = $field['module'] . '_field_' . $op;
However there a calls to "prepare translation" and "delete revision" that should be "prepare_translation" and "delete_revision" like the rest of the hook calls in field.module.
| Comment | File | Size | Author |
|---|---|---|---|
| field_invoke_underscores.patch | 1.37 KB | quicksketch |
Comments
Comment #1
quicksketchComment #2
yched commentedDuh :-/
Comment #3
bjaspan commentedHook tests would be pretty easy to write for these two hooks following the pattern laid out in #489438: hook_field_create_field() is missing, using field_test_memorize(). Is it reasonable to ask that the hook invocations addressed by this issue be tested along with the patch for this issue?
Incidentally, these bugs would have been found by the tests for all Field API hooks requested in #370872: Tests for field_attach hooks.
Comment #4
quicksketchIt seems fair enough that the bug would be fixed separate of the tests, especially since there's a pending issue (since February) to test such functionality. Tests shouldn't hold up fixing of critical bugs, especially since it's been noted that we need to add tests for this functionality anyway. Can't we fix this then continue in the issue you noted?
Comment #5
bjaspan commentedThe committer can decide.
Comment #6
quicksketchThis patch is part of several bugs that need to be fixed for #391330-33: File Field for Core to even start working somewhat correctly. I'd just prefer not to have such a slew of patches applied on my sandbox (not to mention potential testers) that complicate further development.
Comment #7
drewish commentedsubscribing.
Comment #8
dries commentedI committed the patch to CVS HEAD to de-block other issues, but I'm marking it as 'code needs work' so we follow-up with tests. Thanks!