The preview button is not hidden on the node creation form even though I ticked the disable box on admin/store/settings/node-checkout/registrant_profile. Is there another setting somewhere that overrides this? or maybe something else is wrong?

Comments

matthewn’s picture

Same issue here. In need of a fix.

drewish’s picture

Category: support » bug

Looks like it's storing the field here:

  if ($form_state['values']['disable_preview']) {
    $fields[] = 'preview';
  }

  variable_set('uc_node_checkout_'. $form_state['values']['type'] .'_restrictions', $fields);

But when we go to unset the fields:

      // Remove restricted fields for users without access.
      $fields = variable_get('uc_node_checkout_'. $type .'_restrictions', array());

      if (!empty($fields) && !user_access('edit any '. $type .' content')) {
        foreach ($fields as $field) {
          $form[$field]['#access'] = FALSE;
        }
      }

We're missing the preview button because we're looking at $form['preview'] rather than $form['buttons']['preview'].

rszrama’s picture

Status: Active » Fixed

Thanks, drewish. Added a special case for the preview button. Duh. This should be fixed in beta4.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Version: 6.x-2.0-beta3 » 6.x-2.0-beta4

I'm running beta4 and the preview button is still appearing on the node creation page. The "admin/store/settings/node-checkout/registrant_profile" page no longer exists in beta4, and I haven't found any other way to remove the preview button.

Thank you for creating and maintaining this great module!

Anonymous’s picture

Status: Closed (fixed) » Active

I've re-opened the issue.

Am I supposed to re-open issues, or let the module maintainer take care of this? If I post a new comment to a closed issue, will anyone see it? Sorry, I'm not fully familiar with how the forums work.

scotwith1t’s picture

i can't seem to get this to work either, using latest dev version. could be i'm just not getting enough sleep...

aidanlis’s picture

Assigned: Unassigned » aidanlis
aidanlis’s picture

Assigned: aidanlis » Unassigned
Status: Active » Fixed

The node specific page exists and has not moved, and hiding the preview button works as expected. Note the button is not hidden if you have the "edit any xxx content type" permission.

Status: Fixed » Closed (fixed)

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