Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
foreach (entity_ui_controller() as $controller) { # line 505
$forms += $controller->hook_forms();
}
entity_ui_controller() returns NULL which is obviously not an array. :P
I tried some various dvm()ing inside entity_ui_controller(). The gist is that the format of the entity_get_info() array has changed. Entity's looking for stuff at $info['admin ui']['path'] and the 'admin ui' index no longer exists (it's now 'admin', underneath an $entity_type index). I tried re-jiggering the checks in that function to match the output of entity_get_info() and then I get Fatal error: Call to undefined method UserController::hook_form() and the like, which I don't really understand, and certainly isn't an improvement. ;P
I have got:
Warning: Invalid argument supplied for foreach() in entity_menu() (line486 of /var/www/html/modules/entity/entity.module)
after I enable and save the Entity CRUD API module.
Comments
Comment #1
webchickI'm also seeing this once per page with the Media Development Profile.
Comment #2
webchickProblematic part of code is:
entity_ui_controller() returns NULL which is obviously not an array. :P
I tried some various dvm()ing inside entity_ui_controller(). The gist is that the format of the entity_get_info() array has changed. Entity's looking for stuff at $info['admin ui']['path'] and the 'admin ui' index no longer exists (it's now 'admin', underneath an $entity_type index). I tried re-jiggering the checks in that function to match the output of entity_get_info() and then I get Fatal error: Call to undefined method UserController::hook_form() and the like, which I don't really understand, and certainly isn't an improvement. ;P
Comment #3
webchickIncidentally, I got a similar error during installation on entity_menu() for the same reason.
Comment #4
webchickAnd since something seems to be just flat-out wrong here, increasing priority.
Comment #5
psy commentedSame here. Thx webchik.
Given other modules use this API this should be a priority for the developer.
maybe something to do with D7B2?
Comment #6
fagoSry, I introduced this problem with #920546: Entity CRUD generic UI. I think I already fixed that with http://drupal.org/cvs?commit=441076.
Comment #7
psy commentedOk. So I had installed the dev version.
I just reverted back to beta1 and all seems good.
Comment #8
fagoComment #9
Dien commentedI have got:
Warning: Invalid argument supplied for foreach() in entity_menu() (line486 of /var/www/html/modules/entity/entity.module)
after I enable and save the Entity CRUD API module.