- πΊπΈUnited States goose2000
This issue still exists for the latest version Simplenews. Not sure if form_alter() is the right way to correct this in Drupal 10.
dev-4.x 344532a
dev-4.x 91c4849
When you clone a simplenews node that has been sent (emailed), the clone node also has the status of being sent and so it cannot be sent again. I have a client who wanted to able to clone a newsletter so it could be sent to different newsletter groups. To solve this problem I have written a small custom module that resets the status and count of emails sent, could this be included as a feature in a future release
extract of code...
function module_form_alter(&$form, &$form_state, $form_id) {
switch ($form_id) {
case 'simplenews_node_form':
if (stripos($form['#action'],"/clone") !== false) {
$pnode = $form['#parameters'][2];
$pnode->simplenews['sent_subscriber_count']=0;
$pnode->simplenews['s_status']=0;
$form['#parameters'][2]=$pnode;
$node = $form['#node'];
$node->simplenews['sent_subscriber_count']=0;
$node->simplenews['s_status']=0;
$form['#node']=$node;
}
break;
default:
break;
}//switch
} //module_form_alter
Fixed
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This issue still exists for the latest version Simplenews. Not sure if form_alter() is the right way to correct this in Drupal 10.
dev-4.x 344532a
dev-4.x 91c4849