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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rcross’s picture

FileSize
21.42 KB

This should clean this up.

rcross’s picture

Status: Active » Needs review

forgot to change status

Status: Needs review » Needs work

The last submitted patch failed testing.

rcross’s picture

Status: Needs work » Needs review
FileSize
21.45 KB

re-rolled.

yched’s picture

Status: Needs review » Reviewed & tested by the community

Great ! RTBC.

Status: Reviewed & tested by the community » Needs work

The last submitted patch failed testing.

yched’s picture

Status: Needs work » Needs review
FileSize
20.13 KB

Rerolled. Would be cool to get in quick, since this is bound to break quite often.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Looks great, tests pass, RTBC.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Nice clean-up! Committed to HEAD. :)

Status: Fixed » Closed (fixed)

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

Jaza’s picture

Assigned: Unassigned » Jaza
Priority: Normal » Critical
Status: Closed (fixed) » Needs review
FileSize
1.54 KB

I found 3 remaining calls to field_attach_extract_ids() in field.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.

Status: Needs review » Needs work

The last submitted patch failed testing.

yched’s picture

Priority: Critical » Normal
Status: Needs work » Postponed

You shouldn't be using CCK HEAD anymore), it's outdated and superceded by core's field_ui module.
Back to closed.

bjaspan’s picture

Status: Postponed » Fixed

This 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.

yched’s picture

Status: Fixed » Closed (fixed)

Oops. I did mean 'closed'.