I have looked everywhere on this site searched and did a Google site search but I can not find where I can make the log message(when creating content) a required field can any body help me with this or point me in the right direction?

Comments

sjancich’s picture

I'm wondering how to do this too!

tsavino’s picture

Go to your modules directory the go to node find node.module open it up go to line 2059 and replace with the code below, but I warn you that every content type will have to put a log message in but thats what I need.

Look for this

  // Add a log field if the "Create new revision" option is checked, or if the
  // current user has the ability to check that option.
  if ($node->revision || user_access('administer nodes')) {
    $form['log'] = array(
      '#type' => 'textarea',
      '#title' => t('Log message'),  
      '#rows' => 2,
      '#weight' => 20,
      '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.'),
    );
  }


Change it to this

  // Add a log field if the "Create new revision" option is checked, or if the
  // current user has the ability to check that option.
  if ($node->revision || user_access('administer nodes')) {
    $form['log'] = array(
      '#type' => 'textarea',
      '#title' => t('Log message'),
      '#required' => TRUE,	  
      '#rows' => 2,
      '#weight' => 20,
      '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.'),
    );
  }
christefano’s picture

There's an ongoing discussion about adding this behavior to Drupal core. Modifying Drupal core like this can end up being a maintenance headache. Please see http://drupal.org/node/120207



Christefano  
Founder, CEO
Large Robot
954-247-4786
http://www.largerobot.com