For proper entity module support we need a property_type in hook_field_info() and a hook_entity_property_info().
This would make fields accessible to modules using entity wrapper functionality etc. like Rules and Search API.

For more info see #1393452-4: Getting fields to appear on the 'Select fields to index' page

I plan to do this very soon (hopefully by tomorrow) and will post a patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

grasmash’s picture

Did you ever make this change? I would love a patch!

grasmash’s picture

Status: Active » Needs review
FileSize
2.96 KB

Here's a first attempt. It seems to be working so far! Thanks to @rooby for posting helpful links.

grasmash’s picture

Just realized I used the wrong function naming convention for this module. Updated patch attached.

grasmash’s picture

Alright. Last try. I rolled that last patch incorrectly. Monday mornings are killers.

rooby’s picture

Wow I never got back to this one.

Thanks for the patch, I will try to test it soon.

rodmaz’s picture

Tried to use this patch. Although no complains I don't see the fields visible.

rodmaz’s picture

Priority: Normal » Major

Can anyone please check this out? I could not find yet the reason but calls to entity_get_all_property_info() still do not show cck_phone fields, even after this patch.

gilgabar’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #4 looks and works fine for me.

@rodmaz make sure you clear the cache after applying the patch.

RoSk0’s picture

+1 for patch from #4.

pippopeppe’s picture

patch #4 works with Rules! Thanks!

ckng’s picture

Issue summary: View changes
Priority: Major » Normal
Status: Reviewed & tested by the community » Fixed

Thanks for all the works, committed to D7.

Status: Fixed » Closed (fixed)

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