• Resolved ollybach

    (@ollybach)


    WP 3.8.1

    the idea is good but i just get these errors in the console and it doesnt stop me from submitting although i – deliberately set the max_input_vars to 50 to see what happens (obviously on a development installation)…

    Uncaught SyntaxError: Unexpected token = jquery.maxsubmit.js:44
    Uncaught TypeError: Object [object Object] has no method ‘maxSubmit’

    https://www.ads-software.com/plugins/wp-max-submit-protect/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter ollybach

    (@ollybach)

    btw, this is a virgin install of WP 3.8.1, no other plugin installed but this one and it just throws js errors

    Plugin Author Jason Judge

    (@judgej)

    Olly,

    Sorry – I don’t get notifications of new support requests, so have only only just seen this.

    I’ll check this out now and see what the problem could be.

    Plugin Author Jason Judge

    (@judgej)

    I’m guessing you have something like this around line 44 of your source page, where the JS error is being invoked:

    <script type="text/javascript">
    /* Plugin: WP Max Submit Protect */
    jQuery(document).ready(function($) {
    $('form').maxSubmit({
    max_count: 2000,
    max_exceeded_message: "This form has too many fields ({form_count}) for the server to accept (max {max_count})\nData may be lost if you submit. Are you sure you want to go ahead?"
    });
    })
    </script>

    Higher up in the header, you should have the JS library included:

    <script type='text/javascript' src='https://exmaple.co.uk/wp-content/plugins/wp-max-submit-protect/js/jquery-maxsubmit/jquery.maxsubmit.js?ver=1.0.5'></script>

    Either it is missing, or they are the wrong way around, or maybe jQuery is not being loaded early enough?

    It works find for my on a multi-site and several single sites. However, I’ll try a fresh 3.8.1 in case it is other plugins I have installed that are helping to change the order JS is loaded.

    Thread Starter ollybach

    (@ollybach)

    Hey
    no worries.
    I just messed around with things and came across that one and thought I pass it on
    (chrome btw)

    Plugin Author Jason Judge

    (@judgej)

    Just installed a fresh 3.8.1 on PHP 5.3 and the plugin. No JS errors so far. Is there anything more you can tell me about your site, or do you have a link you could send me?

    I’ll try Chrome too.

    Thread Starter ollybach

    (@ollybach)

    it was all on localhost, so cant really send you a link (and i have since done a ton of other things here)

    if you want, i can flatten this install (i do that all the time anyway to test my own plugins) and see if i can reproduce it again ?!

    Plugin Author Jason Judge

    (@judgej)

    I found a syntax error in the JS that was throwing Chrome out, but which Firefox was simply ignoring. I’ve fixed that in this plugin (version 1.0.6 now released) and also in the underlying jQuery plugin (https://github.com/judgej/jquery-maxsubmit and https://plugins.jquery.com/jquery-maxsubmit/).

    Thanks for your help – I must remember to test against a wider range of browsers.

    If this works for you, please feel free to close this ticket.

    Thread Starter ollybach

    (@ollybach)

    resolved as far as i’m concerned. i dont really need this plugin (not at the moment anyway)

    i only had someone else install it to see what happens who then – in turn – said it all went wrong / didnt work, so I just installed it as mentioned above and got those errors which I thought I might as well just pass on.

    > re: I must remember to test against a wider range of browsers.

    bane of our lives i would have thought :)…..
    wouldnt it be nice if they would all do the same thing the same way..?
    (most likely never gonna happen though …ho hum)

    Plugin Author Jason Judge

    (@judgej)

    Cool. Well thanks again for spending the time to report this. Knowing something is not working is always the first important step to being able to fix it ?? Automated testing for WP is a little more difficult than a library or standalone piece of code.

    Thread Starter ollybach

    (@ollybach)

    > Automated testing for WP is a little more difficult than a library or standalone piece of code.

    isn’t that the truth…..:)

    Thread Starter ollybach

    (@ollybach)

    > Automated testing for WP is a little more difficult than a library or standalone piece of code.

    isn’t that the truth…..:)

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘doesnt really work it seems’ is closed to new replies.