• We found that when using an extension such as ‘UM Story for Ultimate Member’, submitted stories were occasionally double-submitted.
    We tracked the problem down to the code in the UM file ‘um-scripts.js’ (Um version 2.0.56) which disables the submit button after clicking once.
    This code submited the form after a click on the submit button, but did not prevent the normal handling of the click, which in this case submitted the form again.
    To prevent this we have added a ‘return false;’ to the UM click-handler.

    This should probably be ported back into the main UM plugin code.
    Can someone submit this to the code developers?

    The specific changes we made were in the file ‘assets/js/um-scripts.js’, where we changed lines 368-371

    	jQuery(document).one('click', '.um:not(.um-account) .um-form input[class="um-button"][type="submit"]:not(.um-has-recaptcha)', function() {
    		jQuery(this).attr('disabled','disabled');
    		jQuery(this).parents('form').submit();
    	});
    

    to

    	jQuery(document).one('click', '.um:not(.um-account) .um-form input[class="um-button"][type="submit"]:not(.um-has-recaptcha)', function() {
    		jQuery(this).attr('disabled','disabled');
    		jQuery(this).parents('form').submit();
    		return false;
    	});
    

    We have manually made corresponding changes to um-scripts.min.js.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @greenlightsolutions,

    I’m afraid, we are not developers of UM Story for Ultimate Member since it’s a third party extension please submit your question to the Suit plugins support.
    We are not able to provide support for third-party extensions.

    Regards.

    Thread Starter greenlightsolutions

    (@greenlightsolutions)

    I would, except that this is not an UM Story bug, but an Ultimate Member bug. I happened to encounter it when using the UM Story extension, but I imagine this problem might occur with any number of other extensions. And of all factors which came together to cause the problem, the above Ultimate Member code-fragment is one that is extremely easy to correct (as well as one that is obviously not correct in its current form). For this reason, I think this _is_ the proper forum to raise this issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Double-form-submission bug in UM (manifesting with UM-Story extension)’ is closed to new replies.