Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In simplenews.module around line 497 the following code is causing problems for me...
if ($form_id == 'taxonomy_form_vocabulary' && isset($form['vid']) && $form['vid']['#value'] == $vid) {
// Hide critical options from newsletter vocabulary.
$form['help_simplenews_vocab'] = array(
'#value' => t('This is the designated simplenews vocabulary.'),
'#weight' => -1,
);
// We display the current content type settings in a disabled form element
// to the user. The real value passed in the form separately because
// disabled elements do not get saved at submit.
$form['content_types']['display_only'] = $form['content_types']['nodes'];
$form['content_types']['display_only']['#disabled'] = TRUE;
$form['content_types']['display_only']['#description'] = t('These content type(s) are used as newsletter. They can be set in !simplenews_settings.', array('!simplenews_settings' => l('Simplenews settings', 'admin/settings/simplenews')));
$form['content_types']['nodes'] = array(
'#type' => 'value',
'#value' => $form['content_types']['nodes']['#default_value'],
);
// Free tagging can not be allowed see: simplenews_validate_taxonomy().
$form['settings']['tags'] = array('#type' => 'value', '#value' => FALSE);
// Multiple select does not work with simplenews.
$form['settings']['multiple'] = array('#type' => 'value', '#value' => FALSE);
$form['settings']['required'] = array('#type' => 'value', '#value' => TRUE);
}
Basically, I am trying to apply the same vocabulary to many node types so that content of different types that talk about the same subject can be within 1 list. The code above denies me the ability to apply the same vocabulary to any other content type apart from newsletter which restricts functionality. Is there not a better way of doing this?
thanks
Will
Comments
Comment #1
Simon Georges CreditAttribution: Simon Georges commentedThese modifications are applied only on Simplenews vocabulary, can't you use a second vocabulary applied to all your content types to implement the functionnality you're looking for ?
Comment #2
Simon Georges CreditAttribution: Simon Georges commentedComment #3
szeidler CreditAttribution: szeidler commentedSame problem here. The users should have the possibility to subscribe the same terms that can be refered in other content types. For further usage it is necessary, that the newsletter has the same tid, that a e.g. a story has.
Comment #4
Simon Georges CreditAttribution: Simon Georges commentedThere is no work done any more on the 6.x-1.x branch.
Can somebody test the 6.x-2.x version to see if it's better or if there still is the same concern ?
Comment #5
szeidler CreditAttribution: szeidler commentedThere is still the same code fragment (and same limitation) in 6.x-2.x.
Comment #6
ympf CreditAttribution: ympf commentedIm stuck with the same problem, did anyone come up with a solution?
Comment #7
Simon Georges CreditAttribution: Simon Georges commented