When a user has an existing item in moderation, and they go to edit it. When they submit the item, or preview it the message, "The post has been submitted for moderation and won't be listed publicly until it has been approved." shows up twice, if it's already submitted and you click the preview button.

It's a minor problem, and doesn't really affect anything but the user interface.

Drupal 6.15

Comments

TechnoBuddhist’s picture

I found this today, the fix is simple;

remove the unecessary return ''; in the modr8.module, a couple of lines before the end...

function theme_modr8_message($teaser = FALSE, $nodetype = 'page', $op = 'view') {
  static $already_messaged = FALSE;

  // Don't add the message more than once per page load.
  if ($already_messaged) {
    return;
  }
  if ($teaser) {
    return ' <div class="marker">'. t('Pending moderation') .'</div>';
  }
  else {
    switch ($op) {
      case 'view':
        drupal_set_message(t("The post has been submitted for moderation and won't be listed publicly until it has been approved."), 'warning');
        break;
      case 'node_form':
        drupal_set_message(t('This %type will be submitted for moderation and will not be accessible to other users until it has been approved.', array('%type' => node_get_types('name', $nodetype))));
        break;
    }
//    return '';  // NOTED OUT TO FIX DOUBLE SUBMITTED FOR MODERATION MESSAGE
  }
  $already_messaged = TRUE;
}
pwolanin’s picture

Status: Active » Needs review
StatusFileSize
new458 bytes

patch form

pwolanin’s picture

Status: Needs review » Fixed

committed to 5.x and 6.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.