When viewing the Entityform Type import form there is a Notice
Notice: Undefined variable: bundle in entity_ui_get_page_title() (line 206 of /Applications/MAMP/htdocs/do_modules/d7_entityform_7_2/sites/all/modules/contrib/entity/entity.module).
This caused because of problem in entity_ui_get_page_title function provide by the Entity API
if (isset($entity)) {
list(, , $bundle) = entity_extract_ids($entity_type, $entity);
}
return entity_ui_get_action_title($op, $entity_type, $bundle);
There is no existing entity on import form so $bundle is undefined.
The uploaded patch fixes the issue.
Original Issue
Hi,
Under Import entityform type, thanks
Notice: Undefined variable: bundle in entity_ui_get_page_title() (line 749 modules\entity\includes\entity.ui.inc)
Comments
Comment #1
tedbowSorry please provide more details
Comment #2
jetwodru commentedI just clicked Import Entityform type and this error shows. Thanks

Comment #3
mixael commentedConfirm. Same problem importing CRM Core contact types.
Comment #4
tedbowAre those Entityform types?
Comment #5
jetwodru commentedHi,
I'm NOT using CRM Core, I just clicked Import EntityForm type and the error showed. Thanks
Comment #6
mixael commentedI think yes.
Trying to import got:
Notice: Undefined variable: bundle in entity_ui_get_page_title() (line 749 of .....sites/all/modules/entity/includes/entity.ui.inc).
Interesting that same site configuration on different hostings work differently - on one all is OK (php version 5.2.17) on another with this error (php 5.2.10).
Comment #7
tedbowSwitching this to Entity API module. After updating to the entity-7.x-1.x branch the error changes to:
Same problem but the function has moved.
The problem is there is no existing entity(or bundle) on import pages so entity_ui_get_page_title throughs error here:
I have attached a patch that fixes this.
Comment #8
tedbowComment #9
jetwodru commentedHi,
As tested, this does happen on Entityform 7.x.1.2 on a fresh drupal 7.24 installation. Currently, I'd decided to switch back to Entityforms 7.x.1.2 (no obviously known bugs so far except the Import EntityFormType ) coz 7.x.2.0 beta 2 still has many bugs as posted just now on a few threads after testing it on a fresh Drupal 7.24, not usable on production site. Thanks
Notice: Undefined variable: bundle in entity_ui_get_page_title() (line 749 of E:\Paul_E\Websites\Test\drupal724\sites\all\modules\entity\includes\entity.ui.inc).
Comment #10
rclemings commentedThis patch (#7) works for me (Drupal 7.26, entity 7.x-1.3, entityform 7.x-2.0-beta2). Is there a reason it hasn't been committed to dev?
Comment #11
tedbow7: entity-bundle_undefined_on_import-2156697-7.patch queued for re-testing.
Comment #12
tedbow@rclemings, this issues was never set to RTBC..
Since it has been a couple months I set the patch to re-test.
When testing patches for the purpose of helping issues get committed you should also test against the dev version of the module being patched.
In this case Entity API 7.x-1.x-dev.
Comment #13
tedbowok the patch still passes tests.
@rclemings and others wanting to get this committed to Entity API. Please review/test against Entity API 7.x-1.x-dev.
If it works for you and you don't see any problem please set to Review and Tested by Community.
I am not a Entity API module maintainer so I can't commit this.
Comment #14
rclemings commentedIt works with Entity API 7.x-1.x-dev as well. So I'll change the status as you asked.
Comment #15
fagoThanks, committed.