With the latest upgrade of Drupal (and possibly the entity module), I'm getting an error when the menu items are synced using the batch:
EntityMalformedException: Missing bundle property on entity of type taxonomy_term. in entity_extract_ids
This is because the loaded terms do not have a 'vocabulary_machine_name' (bundle) property. This can be fixed by adding some parameters to the call to `taxonomy_get_tree` in the function `_taxonomy_menu_insert_link_items_batch`:
function _taxonomy_menu_insert_link_items_batch($vid) {
$terms = taxonomy_get_tree($vid, 0, NULL, TRUE);
$menu_name = variable_get(_taxonomy_menu_build_variable('vocab_menu', $vid), FALSE);
// ...
The last 'TRUE' is the key; this makes sure the terms are fully loaded.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2174889-1-pass-correct-args.patch | 435 bytes | dstol |
Comments
Comment #1
dstolLet's see what testbot says here.
Comment #2
dstolThanks for the report. Committed to 7.x-1.x
Comment #4
docans commentedI am having this same error: " Missing bundle property on entity of type taxonomy_term. " i am on commerce kickstart which primary uses the taxonomy menu.
I got this error when i tried importing taxonomy term with feeds. using data from views data export module.