Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jan 2011 at 18:34 UTC
Updated:
25 Jan 2011 at 13:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
jhodgdonThanks for filing this issue, after we discussed this in IRC. Needs a bit more investigation... The part in question is where it says "not applicable for nodes", which appears to be wrong.
Comment #2
jhodgdonActually, only node and taxonomy entities in Core currently define 'bundle keys'.
I investigated, and I'm pretty sure that this component of entity info is only used in field_extract_bundle():
http://api.drupal.org/api/drupal/modules--field--field.module/function/f...
In Core, this function is called by the Field UI module in menu callback functions (page callbacks, load callback, and access callback). In all of these cases, the input argument $bundle to the function is a string, so it is never going to try to use 'bundle keys' at all (it will just return $bundle).
So my guess is that this doesn't really work.
That aside, since Node and Taxonomy are the two cases in Core that define this, definitely the part of the doc that says it doesn't apply to Node should be removed. Here's a patch.
Comment #3
yched commentedDid some history digging :
The "not applicable for nodes' part was added in #488542: Tie Field UI pages to any fieldable entity in July, 2009.
Later on, #597508: Use path argument loader for node type paths (Oct, 2009) made it moot.
The patch is correct. If we want to be exhaustive, the full explanation would be something like :
This entry is required if the 'path' provided in the 'bundles' section identifies the bundle using a named menu placeholder whose loader callback returns a structured object (e.g. $vocabulary for taxonomy terms, or $node_type for nodes).
This entry can notably be omitted if this type's bundles do not exist as stand-alone objects.
There might be a better wording :-/
Comment #4
jhodgdonAh, thanks! That makes sense to me, given my own investigations.
Here's a new patch, incorporating #3. I also made a small change in the referenced bundles/admin/path section, since it was referring to an element there that had apparently been removed.
Comment #5
yched commentedWorks for me.
Thanks !
Comment #6
dries commentedCommitted to CVS HEAD. Thanks.