Pergunta

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) { //LINE 218
      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 ?

Foi útil?

Solução

From the tags and the error I'm guessing you're trying to use Drupal 7. Problem is, like many contributed modules right now, the Classified Ads module only supports Drupal 6. Notice on the drupal.org project page there's no 7.x version listed, only 5.x and 6.x.

Try a Drupal 6 instance and I bet you'll find it works a charm.

Outras dicas

Version 7.x-3.x-rc1 7.x-3.x-rc2 was released between Christmas 2011 and New Year's Day 2012 and has changed a lot since that question was asked.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top