Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Jquery Uncaught error on dropdown

Viewing 6 posts - 1 through 6 (of 6 total)
  • pOgOstyle
    #155614

    Hello,
    Im using the archive mode with dropdown (combobox) and i got this error while using the button. It happens only when i “not” apply a submit or another refresh before.

    Tested on different server’s – hope you can help me out.

    jquery.js?ver=1.12.4:2 Uncaught Error: Syntax error, unrecognized expression: select[name=_sft_wpfc_preacher[]] option:selected
    at Function.fa.error (jquery.js?ver=1.12.4:2)
    at fa.tokenize (jquery.js?ver=1.12.4:2)
    at fa.select (jquery.js?ver=1.12.4:2)
    at Function.fa (jquery.js?ver=1.12.4:2)
    at Function.a.find (jquery-migrate.min.js?ver=1.4.1:2)
    at n.fn.init.find (jquery.js?ver=1.12.4:2)
    at n.fn.init.a.fn.find (jquery-migrate.min.js?ver=1.4.1:2)
    at a.fn.init.n.fn.init (jquery.js?ver=1.12.4:2)
    at new a.fn.init (jquery-migrate.min.js?ver=1.4.1:2)
    at n (jquery.js?ver=1.12.4:2)
    fa.error @ jquery.js?ver=1.12.4:2
    fa.tokenize @ jquery.js?ver=1.12.4:2
    fa.select @ jquery.js?ver=1.12.4:2
    fa @ jquery.js?ver=1.12.4:2
    a.find @ jquery-migrate.min.js?ver=1.4.1:2
    find @ jquery.js?ver=1.12.4:2
    a.fn.find @ jquery-migrate.min.js?ver=1.4.1:2
    n.fn.init @ jquery.js?ver=1.12.4:2
    a.fn.init @ jquery-migrate.min.js?ver=1.4.1:2
    n @ jquery.js?ver=1.12.4:2
    (anonymous) @ seamless-donations.js?ver=4.9.2:106
    dispatch @ jquery.js?ver=1.12.4:3
    r.handle @ jquery.js?ver=1.12.4:3
    trigger @ jquery.js?ver=1.12.4:3
    a.event.trigger @ jquery-migrate.min.js?ver=1.4.1:2
    (anonymous) @ jquery.js?ver=1.12.4:3
    each @ jquery.js?ver=1.12.4:2
    each @ jquery.js?ver=1.12.4:2
    trigger @ jquery.js?ver=1.12.4:3
    Chosen.result_select @ chosen.jquery.min.js?ver=2.3.4:2
    Chosen.search_results_mouseup @ chosen.jquery.min.js?ver=2.3.4:2
    (anonymous) @ chosen.jquery.min.js?ver=2.3.4:2
    dispatch @ jquery.js?ver=1.12.4:3
    r.handle @ jquery.js?ver=1.12.4:3

    pOgOstyle
    #155615
    This reply has been marked as private.
    pOgOstyle
    #155618
    This reply has been marked as private.
    Ross Moderator
    #155631

    Hi there

    I tested in Chrome and it works fine, but in Edge I see the JS error.

    Can you confirm that it is a browser issue (which browser are you using)? I will then investigate further

    Can I also ask, is this something new with the update yesterday, or a general issue?

    Thanks

    Ross Moderator
    #155634

    Hi there

    I see the issue, it is the plugin seamless donations

    They are using jQuery to hook into every <form> on your website and all <select>s (dropdowns).

    In seamless-donations they have this code:

    jQuery("select[name=" + nameOfChangedSelect + "] option:selected").each(function () {

    This however throws a syntax error on our fields, because they did not use correct syntax (or take into consideration that the name of a field can be an array).

    So our field is called _sft_wpfc_preacher[] (perfectly valid in html and JS), however the issue arises because that plugin uses this selector (from above):

    select[name=_sft_wpfc_preacher[]] option:selected

    I believe this is not valid, and what it should do is correctly wrap our field name in quotes
    select[name="_sft_wpfc_preacher[]"] option:selected

    The way I see to resolve this is:

    1) Make the plugin developer aware of this issue – I believe the solution is to change the line 105 in seamless-donations.js from:
    jQuery("select[name=" + nameOfChangedSelect + "] option:selected").each(function () {
    to
    jQuery("select[name='" + nameOfChangedSelect + "'] option:selected").each(function () {

    2) Find a way to remove seamless-donations from specific html forms, so these events don’t fire. Again, the best way to figure that out would be to ask the plugin author.

    Hope that helps

    pOgOstyle
    #155666

    Wow that was stunning fast and good information!
    Indeed all works fine after deactivating the plugin temproral.

    Thank you very much!

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Jquery Uncaught error on dropdown’ is closed to new replies.