Fatal error: Cannot redeclare views_gallery_settings_form() (previously declared in /var/www/drupal_sites/all/modules/contrib/views_gallery/views_gallery.module:41) in/var/www/drupal_sites/all/modules/contrib/views_gallery/views_gallery_og.module on line 130
Thrown when u turn on Views Gallery OG module.
From views_gallery.module
function views_gallery_settings_form() {
$form = array();
$options = node_get_types('names');
$form['views_gallery_gallery_type'] = array(
'#title' => t('Views Gallery Gallery Type'),
'#description' => t('Set the content type that will be used for galleries.'),
'#type' => 'select',
'#options' => $options,
'#default_value' => views_gallery_gallery_type(),
);
$form['views_gallery_image_type'] = array(
'#title' => t('Views Gallery Image Type'),
'#description' => t('Set the content type that will be used for gallery images.'),
'#type' => 'select',
'#options' => $options,
'#default_value' => views_gallery_image_type(),
);
return system_settings_form($form);
}
Error at views_gallery_og.module - views_gallery_settings_form() below:
/**
* Views Gallery OG settings.
*/
function views_gallery_settings_form() {
$form['views_gallery_og'] = array(
'#type' => 'fieldset',
'#title' => t('Create Views Galleries'),
'#description' => t('Auto-create a Views gallery for every group. Use the syntax [token] if you want to insert a replacement pattern.'),
);
$form['views_gallery_og']['title'] = array(
'#type' => 'textfield',
'#title' => t('Pattern for the title'),
'#default_value' => t('[ogname] Photo Gallery'),
);
$form['views_gallery_og']['body'] = array(
'#type' => 'textarea',
'#title' => t('Pattern for the body'),
'#default_value' => t('A photo gallery for [ogname].'),
);
$form['views_gallery_og']['public'] = array(
'#type' => 'select',
'#title' => t('Make galleries public?'),
'#default_value' => 0,
'#options' => array(0 => t('No'), 1 => t('Yes')),
);
$form['views_gallery_og']['unique'] = array(
'#type' => 'select',
'#title' => t('Unique galleries?'),
'#default_value' => 1,
'#options' => array(0 => t('No'), 1 => t('Yes')), '#description' => t("If set to 'yes', no new gallery will be created for any group that already has a gallery. If set to 'no', this form will create a new gallery for every group, even if that group already has another gallery.")
);
$form['views_gallery_og']['token_help'] = array(
'#title' => t('Replacement patterns'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#description' => t('Use raw-text replacements for text to avoid problems with HTML entities.'),
);
$form['views_gallery_og']['token_help']['help'] = array(
'#value' => theme('token_help', 'node'),
);
$form['views_gallery_og']['submit'] = array(
'#type' => 'submit',
'#value' => t('Create galleries'),
);
return $form;
}
Comments
Comment #1
AntiNSA commentedso how do you fix it?
Comment #2
karens commentedDuplicate of multiple other reports of the same problem. Fixed a long time ago in dev, I need to get a new release out.