• Resolved Artyom

    (@ryabchuk)


    I have compatibility issue with facetwp. If any options enabled css or js its showing at console:

    Uncaught SyntaxError: Unexpected token   in JSON at position 122523
        at JSON.parse (<anonymous>)
        at Function.n.parseJSON (jquery.js?ver=1.12.4-wp:4)
        at Function.a.parseJSON (jquery-migrate.min.js?ver=1.4.1:2)
        at Object.success (front.min.js?ver=3.5.8:1)
        at i (jquery.js?ver=1.12.4-wp:2)
        at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2)
        at x (jquery.js?ver=1.12.4-wp:4)
        at XMLHttpRequest.c (jquery.js?ver=1.12.4-wp:4)

    JS excluded: wp-includes/js/dist/,wp-includes/js/tinymce/,jquery.js, /facetwp/, jquery-migrate.min.js,

    • This topic was modified 4 years, 4 months ago by Artyom.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    ok, so;
    1. is it broken now?
    2. you seem to have “optimize JS” on but “aggregate JS” and “optimize CSS” off?

    I would like to see it broken, do you have a staging site where you could leave it so?

    Thread Starter Artyom

    (@ryabchuk)

    Yes. You can check it. Just select any value at right sidebar.
    Any enabled option conflicting with facetwp. No matter js or css.

    • This reply was modified 4 years, 4 months ago by Artyom.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, can you try below code snippet?

    add_filter('autoptimize_filter_noptimize','facets_noptimize',10,1);
    function facets_noptimize( $flag_in ) {
    	if ( strpos( $_SERVER['REQUEST_URI'], '_tip=' ) !== false ) {
    		return true;
    	} else {
    		return $flag_in;
    	}
    }
    Thread Starter Artyom

    (@ryabchuk)

    Yes. Thank you. Its working for “Tip” attribute. How can enable for all others attributes?

    • This reply was modified 4 years, 4 months ago by Artyom.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    hmmm … try this one instead maybe to avoid having to exclude all possible attributes;

    add_filter('autoptimize_filter_noptimize','facets_noptimize',10,1);
    function facets_noptimize( $flag_in ) {
        if ( $_SERVER['REQUEST_METHOD'] === 'POST' ) {
    		return true;
    	} else {
    		return $flag_in;
    	}
    }
    Thread Starter Artyom

    (@ryabchuk)

    Working! Thank you for help and plugin!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome, feel free to leave a review of the plugin and support here! ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Conflict with Facetwp’ is closed to new replies.