Hi,

I was getting Notice: Undefined index error on Taxonomy manage fields page.
When you create a new category in taxonomy, name and description fields shows up by default in manage fields tab. I had this commerce_services module enabled and was not getting default name and description fields on the manage fields tab.

I dont know how taxonomy and commerce_services module affect each other but after disabling commerce_services modules fields started to show up in the field list again.

Anyone knows what is happening?

Comments

nayanalok created an issue.

laboratory.mike’s picture

I found the issue. Starting from Line 2032 in commerce_services.module:

/**
 * Implements hook_entity_info_alter().
 *
 * The core Taxonomy module specifies an incorrect bundle key name for the
 * taxonomy_term entity type. Once core is patched, this alter hook can be
 * removed, but in the meantime it is essential for flattening fields on
 * taxonomy term entities.
 *
 * @see http://drupal.org/node/1736466
 */
function commerce_services_entity_info_alter(&$info) {
  $info['taxonomy_term']['bundle keys']['bundle'] = 'vocabulary_machine_name';
}

Read the @see item - it looks like they aren't going to fix this anytime soon, so I think that the patch should come in on this side. Simply commenting out the line "works" for the Taxonomy vocab page, but otherwise it isn't going to work when needed. A hacky solution would be to rig when this alteration is called, and more appropriately, we might need to include the appropriate exceptions in this module when field flattening takes place.