Support » Plugin: Q2W3 Fixed Widget for WordPress » a.target.className.indexOf is not a function

Viewing 15 replies - 1 through 15 (of 21 total)
  • Same here….

    It seems to come with the Autooptimize plugin, and therefore the stickyness do not work.

    • This reply was modified 1 year, 3 months ago by  herbertwest1.

    Thank you, herbertwest1!

    Yes I used Autoptimize plugin together. However this error, stickyness works well in my site.
    I will check Autoptimize setting and code. If I find how to solve this, I will report it here.
    Thank you.

    Hello
    I’m getting the same error
    I’m not using autooptimize plugin.
    I used jch optimize but this error shows up regardless whether that plugin is activated or not

    Uncaught TypeError: a.target.className.indexOf is not a function
        at q2w3-fixed-widget.min.js:1
        at Array.forEach (<anonymous>)
        at MutationObserver.<anonymous> (q2w3-fixed-widget.min.js:1)

    Hello, ropezg.

    Thank you for sharing the your condition. Then, is it a common error using q2w3 fixed widget plugin?

    > Developer teams, @max-bond sensei
    Could you check this issue?

    • This reply was modified 1 year, 3 months ago by  double guard.

    Hi
    Same problem for me.
    I embedded script for build form and it doesn’t work on preview, but worked on the dashboard with visual composer “Text Block”.
    I checked the issue on console.

    Since I can’t provide the full script this is the code section that occurring issue.
    …&&a.target.className.indexOf(“q2w3-fixed-widget-container”)==-1&&(q2w3Refresh=!0)})});…

    So I deactivated the q2we fixed widget plugin and embed script worked. Could you let me know how can I fix this issue using this plugin?
    Thank you

    Hello,
    Same problem here…
    It looks like it just works when using pure text in the widget. But when using html tags the code crash and the plugins isn’t working.

    Cannot edit so I update in another post: it’s seems like this error is persistent, even if everything seems to be working fine?

    According this post, such errors seem to arise from attempting to add/refer a DOM element too early. One suggested fix that’s working for me is wrapping up the q2w3-fixed-widget.min.js code inside a $(document).ready(function(){ //q2w3 code here }); statement.

    Correction. The proper WP way: jQuery(document).ready(function($){//q2w3 code here}

    Hello alex359,

    Thanks for the tip. i’ve tried it and emptied my cache, but it doesnt seem to work…

    Hi @herbertwest1,

    Strange, this hack has worked fine for me ever since, and I’m often looking at the js console because of other stuff. Please make sure a) Hitting CTRL+F5 in your page to make sure twice it isn’t taking the cached version; b) Open the script directly from view source, to see with your own eyes it’s indeed loading the tweaked version. Example:

    https://yourdomain.com/wp-content/plugins/q2w3-fixed-widget/js/q2w3-fixed-widget.min.js?ver=5.1.4

    Sorry for maybe restating the obvious, but funny stuff happens sometimes and getting back to square one is the safest bet to start clean to figure out what’s happening. If it’s still getting the same error, perhaps trying to dequeue and enqueue q2w3-fixed-widget.min.js later (never bothered me so much to try that myself though).

    Hey alx, sorry for the late reply.

    The js has indeed been changed, and I can find the modified code within the autoptimize js but I still get the error…

    This is a dumb question but i’ve just realised : “q2w3-fixed-widget-container” does not seem to be in the page.

    Maybe my whole issue is that somehow, the class is not added despite the box being ticked?

    I don’t see such element either, at least in view source, nor wrapping a fixed widget. If might be of any help, my settings are as follow:

    
    General Options:
    Margin Top: 75px
    Margin Bottom: 0
    Stop ID: footer
    Refresh interval: 1500ms
    Disable Width: 0
    Disable Height: 0
    Compatibility:
    Auto fix widget id: ON
    Disable MutationObserver: OFF
    Enable plugin for logged in users only: OFF
    Inherit widget width from the parent container:  ON
    Use jQuery(window).load() hook: OFF
    Custom ID's
    <none>
    

    I checked the exact same settings.

    I had hope for a second, as I noticed that my jquery was quite old (the plugin page says that it requires 1.7 minimum),so I changed it.

    I activated a plugin to add a custom id as the plugin page says “widgets must have an id attribute.”
    So, now I think that the issue still comes from the error in the console…

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘a.target.className.indexOf is not a function’ is closed to new replies.