field_attach_* functions are the "functions that fieldable entities need to call at the right time in their own workflow in order to call themselves fieldable:
f_a_load(), f_a_presave(), f_a_insert()...". They are listed on http://api.drupal.org/api/group/field_attach/7, which lets developpers have a cleaner view of " what do I need to do to be fieldable ? is there any f_a_*() function I have forgotten ?".
There are currently 3 exceptions; field_attach_extract_ids(), field_attach_extract_bundle(), field_attach_create_stub_object(), are just generic helper functions that 'fieldable entity' modules shouldn't actually need to call.
Those 3 functions should be moved back to field.module file, and renamed field_extract_ids(), field_extract_bundle(), field_create_stub_entity()
Obviously, all existing calls to those functions should be renamed too.
Comment | File | Size | Author |
---|---|---|---|
#11 | field_attach_namespace_cleanup.patch | 1.54 KB | Jaza |
#7 | field_attach_namespace-reroll2.patch | 20.13 KB | yched |
#4 | field_attach_namespace-reroll1.patch | 21.45 KB | rcross |
#1 | field_attach_namespace.patch | 21.42 KB | rcross |
Comments
Comment #1
rcross CreditAttribution: rcross commentedThis should clean this up.
Comment #2
rcross CreditAttribution: rcross commentedforgot to change status
Comment #4
rcross CreditAttribution: rcross commentedre-rolled.
Comment #5
yched CreditAttribution: yched commentedGreat ! RTBC.
Comment #7
yched CreditAttribution: yched commentedRerolled. Would be cool to get in quick, since this is bound to break quite often.
Comment #8
catchLooks great, tests pass, RTBC.
Comment #9
webchickNice clean-up! Committed to HEAD. :)
Comment #11
Jaza CreditAttribution: Jaza commentedI found 3 remaining calls to
field_attach_extract_ids()
infield.module
. When trying to create a node from a node type with an imagefield in it, I got this error:Fatal error: Call to undefined function field_attach_extract_ids() in /path/to/cck/cck.module on line 218
Attached patch renames these function calls to
field_extract_ids()
. All working nicely for me now.Comment #13
yched CreditAttribution: yched commentedYou shouldn't be using CCK HEAD anymore), it's outdated and superceded by core's field_ui module.
Back to closed.
Comment #14
bjaspan CreditAttribution: bjaspan commentedThis was fixed then closed. jaza re-opened it and yched said "back to closed" but actually marked it postponed. I'm re-"fixed"ing, mostly so yched will see this and clarify if he meant closed or postponed.
Comment #15
yched CreditAttribution: yched commentedOops. I did mean 'closed'.