Error after installing Classified Ad Module on Drupal 7
Posted
by
Ams
on Stack Overflow
See other posts from Stack Overflow
or by Ams
Published on 2011-01-18T01:50:34Z
Indexed on
2011/01/18
1:53 UTC
Read the original article
Hit count: 517
Hello, i just installed Classified Ad but after the installation i get this error:
- Notice: Undefined index: type in ed_classified_form_alter() (line 218 of /home3/amineamm/public_html/chrini/sites/all/modules/ed_classified/ed_classified.module).
When i look up at the php code i can't figure out how to correct it. Here is my code:
function ed_classified_form_alter(&$form, $form_state, $form_id) {
module_load_include('inc', 'ed_classified', 'ed_classified_utils');
if ($form['type']['#value'] == EDI_CLASSIFIED_MODULE_NAME) {
if ($form_id == 'ed_classified_node_form' && $form['attachments'] && _ed_classified_variable_get('alter_attachment_text', EDI_CLASSIFIED_VAR_DEF_ALTER_ATTACHMENT_TEXT) ) {
// Don't allow the attachments block to be collapsed.
$form['attachments']['#collapsed']=FALSE;
$form['attachments']['#collapsible']=FALSE;
// Enhance the help for classified ads.
// NOTE: this is appropriate for the upload_image module enhancements only!
$form['attachments']['#title']=t('Photo Attachments');
$form['attachments']['#description']= _ed_classified_variable_get('alter_attachment_text_description', t(EDI_CLASSIFIED_VAR_DEF_ALTER_ATTACHMENT_TEXT_DESCRIPTION));
}
}
}
Any suggestion ?
© Stack Overflow or respective owner