It doesn't look like this function does anything, but doesn't seem worth a patch on its own(?) since it's the dev version.

function panelizer_add_revision_info_form_submit(&$form, &$form_state) {
  $entity = $form_state['entity'];
  if (!empty($form_state['use revisions'])) {
    $entity->revision = $form_state['values']['revision'];
    $entity->log = $form_state['values']['log'];
  }
}

Proposed solution:

  $entity = &$form_state['entity'];

Comments

damienmckenna’s picture

Status: Active » Needs review
Parent issue: » #2155813: Plan for Panelizer 7.x-3.2 release
StatusFileSize
new616 bytes

@sonfordangeles: Thanks for pointing out the bug. Yes, it's worth adding a patch.

damienmckenna’s picture

Status: Needs review » Fixed

Committed. Thanks.

Status: Fixed » Closed (fixed)

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

justin.shinn’s picture

StatusFileSize
new527 bytes

I am still getting the following notice when saving(from ID panelizer-edit-content-form) on panelizer content form as a non admin user.

Notice: Undefined index: log in panelizer_add_revision_info_form_submit() (line 227 of /path-to-site/docroot/sites/all/modules/contrib/panelizer/includes/common.inc).

/**
* Form submission callback for panelizer_add_revision_info_form().
*/
function panelizer_add_revision_info_form_submit(&$form, &$form_state) {
$entity = &$form_state['entity'];
if (!empty($form_state['use revisions'])) {
$entity->revision = $form_state['values']['revision'];
$entity->log = isset($form_state['values']['log']) ? $form_state['values']['log'] : "";
}
}

shelane’s picture

This should be open as the issue isn't fixed entirely. The patch Justin Shinn submitted adds another piece to clean this up.