Closed (fixed)
Project:
Metatag
Version:
7.x-1.0-alpha3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Nov 2011 at 13:43 UTC
Updated:
15 Oct 2012 at 19:59 UTC
after clearing the cache I get the following notices:
Notice: Undefined index: bundles in metatag_field_extra_fields() (Line 541 in /sites/all/modules/metatag/metatag.module).
i can fix it by change line 541
foreach (array_keys($entity_info['bundles']) as $bundle) {
if (metatag_entity_supports_metatags($entity_type, $bundle)) {
$extra[$entity_type][$bundle]['form']['metatags'] = array(
'label' => t('Meta tags'),
'description' => t('Meta tag module form elements.'),
'weight' => 10,
);
}
}
to
if (isset($entity_info['bundles'])) {
foreach (array_keys($entity_info['bundles']) as $bundle) {
if (metatag_entity_supports_metatags($entity_type, $bundle)) {
$extra[$entity_type][$bundle]['form']['metatags'] = array(
'label' => t('Meta tags'),
'description' => t('Meta tag module form elements.'),
'weight' => 10,
);
}
}
}
Comments
Comment #1
marcoka commentedi can not reproduce this with the latest version alpha6. reopen if you still have that.
Comment #2
socialnicheguru commentedi do get this.
I think that this is a general entity issue.
some modules don't define entity_info properly. So you can't always rely on it being there.
Comment #3
marcoka commentedComment #4
damienmckennaI believe with how the current system handles entities and entity bundles this shouldn't happen anymore.
Comment #5
damienmckenna