Closed (won't fix)
Project:
Entity Translation
Version:
7.x-1.x-dev
Component:
Base system
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
30 Oct 2013 at 12:46 UTC
Updated:
30 Oct 2013 at 14:12 UTC
Steps to reproduce:
go to http://simplytest.me/ , enter wetkit , choose distribution, click test/install, then visit admin/config/regional/entity_translation
an Undefined index error is thrown on line 106 of entity_translation.admin.inc
Presumably a bundle has no label, this throws an Undefined index error on line 106 of entity_translation.admin.inc
/*LINE 95 */ foreach ($bundles as $bundle => $info) {
/*LINE 96 */ if (entity_translation_enabled_bundle($entity_type, $bundle)) {
/*LINE 97 */ $enabled_bundles++;
/*LINE 98 */ $settings = entity_translation_settings($entity_type, $bundle);
/*LINE 99 */ $settings_key = 'entity_translation_settings_' . $entity_type . '__' . $bundle;
/*LINE 100*/ $form['settings'][$entity_type][$settings_key] = array('#tree' => TRUE);
/*LINE 101*/
/*LINE 102*/ // If the entity defines no bundle we do not need the fieldset.
/*LINE 103*/ if (count($bundles) > 1 || $bundle != $entity_type) {
/*LINE 104*/ $form['settings'][$entity_type][$settings_key] += array(
/*LINE 105*/ '#type' => 'fieldset',
/*LINE 106*/ '#title' => $info['label'],
//SNIPPED
Is there some validation that could to be done here to prevent the undefined index error in similar scenarios?
Comments
Comment #0.0
joseph.olstadclarity enhancement
Comment #0.1
joseph.olstadclarity enhancement
Comment #1
sylus commentedClosing this as is distribution related and don't want to bog down ET queue.
Comment #1.0
sylus commentedremove useless tags inside code section