Field info doc has multiple problems
mikey_p - September 22, 2009 - 07:50
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | documentation |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | fixed |
| Issue tags: | Novice |
Description
On http://api.drupal.org/api/function/field_info_fieldable_types/7 it mentions hook_fieldable_info as the source of information to be returned. According to _field_info_collate_types() (http://api.drupal.org/api/function/_field_info_collate_types/7) this is no longer the case and this information is gathered from hook_entity_info.

#1
Good catch! Just needs a patch...
#2
Hmmm...
There's a lot more than just this problem in the doc in this file. I also noticed that the doc for hook_entity_info() was formatted badly. Here's a patch to fix up all the doc in modules/field/field.info.inc, as well as the hook_entity_info() doc.
#3
The last submitted patch failed testing.
#4
This patch should probably wait until after the next code freeze milestone for a reroll, because applying it (once rerolled) would presumably cause many other patches to need a reroll.
#5
The convention in core is not to use 3rd person in function summaries.
Those changes are no good:
- * Clear the field info cache without clearing the field data cache.+ * Clears the field info cache without clearing the field data cache.
#6
RE #5 - the convention is to use 3rd person, actually. It's just not very well followed.
http://drupal.org/node/1354
#7
Here's a patch reroll.
#8
Great cleanup. Thanks !
#9
Committed to CVS HEAD. Thanks.