I've implemented hook_field_default_fields_alter(), but it never gets called. I'm using 7.x-2.0-rc3.

I think I've tried about everything: I cleared cache from the browser and from drush, set a breakpoint inside my hook implementation, added dpm()s and prints, listed features, re-exported some features, and force-reverted some features.

Files: 
CommentFileSizeAuthor
#6 features-update_hook_field_default_doc-2085159-6.patch1.01 KBmariacha1
FAILED: [[SimpleTest]]: [MySQL] 0 pass(es), 6 fail(s), and 0 exception(s).
[ View ]

Comments

Status:Active» Postponed

I've been using it fine and knowing the code, I don't see know where there would be a bug so my guess it's something with your setup

However, note that 'field' is depacated in 2.x and has been replaced with field_instance and field_base components, are you sure you're using the right hook?

I bet you're right, that I'm using the wrong hook. But I'm sure I'm using what's currently documented in features.api.php. Maybe this needs to be a documentation update? I'll try some other hooks... Should I replace "field" or "fields" with "field_instance"? (e.g. hook_field_instance_default_fields_alter() or hook_field_default_field_instances_alter().)

Title:hook_field_default_fields_alter() not being calledhook_field_default_fields_alter() has been replaced by two new hooks
Component:Field» Documentation
Status:Postponed» Active

It looks like it should be hook_field_default_field_instances_alter() and hook_field_default_field_bases_alter(). So features.api.php should be updated since it still only has a reference to the older, combined hook: hook_field_default_fields_alter. That should be replaced by the two new hooks. Besides that, should the documentation remain the same? (e.g. &$fields getting passed by reference?)

Setting it back to "active" since it's pretty clear this is just a documentation update now.

Title:hook_field_default_fields_alter() has been replaced by two new hooksDocument hook_field_default_field_instances_alter/hook_field_default_field_bases_alter(

hook_field_default_fields_alter does still exist since field component exists, but deprecated

Category:bug» task

Issue summary:View changes
Status:Active» Needs review
StatusFileSize
new1.01 KB
FAILED: [[SimpleTest]]: [MySQL] 0 pass(es), 6 fail(s), and 0 exception(s).
[ View ]

Here's my simple update to the documentation in features.api.php. Is there anywhere else the documentation should be updated?

Status:Needs review» Needs work

The last submitted patch, 6: features-update_hook_field_default_doc-2085159-6.patch, failed testing.

Status:Needs work» Needs review

Status:Needs review» Needs work

The last submitted patch, 6: features-update_hook_field_default_doc-2085159-6.patch, failed testing.