Attempting to save a node using the bypass option does not save.

Screen simply refreshes, but no saving is done until the duplicate value is fixed.

Attempted under administrator as well as bypass permission was given to the specific role.

CommentFileSizeAuthor
Bypass.PNG2.5 KBANANSFPL
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ANANSFPL created an issue.

Coupon Code Swap’s picture

Apparently, onclick is now being stripped from the t() function. Perhaps one of the recent Drupal updates. I put together a quick hack as a temporary workaround. I'm sure the maintainers can come up with a proper patch that is better.

sites/all/modules/unique_field/unique_field.module

-        if (user_access('unique_field_perm_bypass')) {
          $form_id = str_replace('_', '-', $form['#id']);
          $msg .= '<p>' . t('Click !here to bypass this check and resubmit.', array('!here' => "<a href=\"#\" onclick=\"jQuery('form#" . $form_id . " input[name=\'unique_field_override\']').val(1);jQuery('form#" . $form_id . "').submit();return false;\">" . t('here') . '</a>')) . '</p>';
        }

+                if (user_access('unique_field_perm_bypass')) {
          $form_id = str_replace('_', '-', $form['#id']);
          drupal_add_js('jQuery(document).ready(function($){$("#unique").click(function(e){jQuery("form#' . $form_id . ' input[name=\'unique_field_override\']").val(1);jQuery("form#' . $form_id . '").submit();e.preventDefault();});});',array('type'=>'inline','scope'=>'footer','group'=>JS_THEME));
          $msg .= '<p>' . t('Click !here to bypass this check and resubmit.', array('!here' => "<a id=\"unique\" href=\"#\">" . t('here') . '</a>')) . '</p>';
        }
piero.nanni@gmail.com’s picture

I've had the same issue and this patch resolved the error, thank you!