• WordPress 4.1.1
    Traffic Manager Plugin Version 1.4.2
    NextGEN Gallery Plugin Version 2.0.79
    Complexity Theme Version 2.1.2

    There’s a Javascript conflict that is preventing both gallery sliders from working within your Plugin. When I disable it, the site works fine.

    var choix = UserWebStat_gC("whatChoiceForGoogleCookies") ;

    is the line causing the conflict, which is in the following function:

    function whatChoiceForGoogleCookies() {
    	var choix = UserWebStat_gC("whatChoiceForGoogleCookies") ;
    	if (choix==null) {
    		return "NO_CHOICE" ;
    	}
    	return choix ;
    }

    https://wordpress.org/plugins/traffic-manager/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Sed Lex

    (@sedlex)

    What is the javascript error ? because if you identify the line that conflict I have no idea what cause this error …

    At least could you provide an URL to see this error ?

    Thread Starter Douglas “BearlyDoug” Hazard

    (@bearlydoug)

    Aaand of COURSE I forgot the error message, haha! Was trying to make sure I gave you everything that I forgot the most important thing. 🙂

    Timestamp: 4/17/2015 2:54:53 PM
    Error: ReferenceError: UserWebStat_gC is not defined
    Source File: http://REMOVED.tld/wp-content/sedlex/inline_scripts/95a3d2f52bcb922eed43e103ac98d360822034f5.js?ver=20150417
    Line: 36

    Let me pre-emptively get you the actual code…

    /*====================================================*/
    /* FILE /sedlex/inline_scripts/62f21a71d4d66c45c33e255a38a9c24267932b13.js*/
    /*====================================================*/
    
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-40731908-1']);
    _gaq.push(['_trackPageview']);
    _gaq.push(['_trackPageLoadTime']);
    
    (function() {
    	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
    
    function acceptGoogleCookies() {
    	UserWebStat_sC("whatChoiceForGoogleCookies","ACCEPT_COOKIE",30) ;
    	jQuery('#infoGoogleCookies').remove() ;
    
    	jQuery(".google_traffic_cookies_allow").hide() ;
    	jQuery(".google_traffic_cookies_refuse").show() ;
    }
    
    function refusGoogleCookies() {
    	UserWebStat_sC("whatChoiceForGoogleCookies","REFUS_COOKIE",30) ;
    	jQuery('#infoGoogleCookies').remove() ;
    
    	jQuery(".google_traffic_cookies_allow").show() ;
    	jQuery(".google_traffic_cookies_refuse").hide() ;
    }
    
    function whatChoiceForGoogleCookies() {
    	var choix = UserWebStat_gC("whatChoiceForGoogleCookies") ;
    	if (choix==null) {
    		return "NO_CHOICE" ;
    	}
    	return choix ;
    }
    
    jQuery(function() {
    	// On gere les boutons
    	if (whatChoiceForGoogleCookies()=="REFUS_COOKIE") {
    		jQuery(".google_traffic_cookies_allow").show() ;
    		jQuery(".google_traffic_cookies_refuse").hide() ;
    	} else if (whatChoiceForGoogleCookies()=="ACCEPT_COOKIE") {
    		jQuery(".google_traffic_cookies_allow").hide() ;
    		jQuery(".google_traffic_cookies_refuse").show() ;
    	} else {
    		jQuery(".google_traffic_cookies_allow").show() ;
    		jQuery(".google_traffic_cookies_refuse").show() ;
    	}
    }) ; 
    
    function show_optIn(){
    	jQuery("<div id='infoGoogleCookies' style='z-index:1000; border:1px solid black; opacity:0.9;background-color:#999999;width:100%;position:fixed;top:0px;color:#EEEEEE;'>   <p style='text-align:center'>This site may uses cookies for statistics with Google Analytics. Do you accept such cookies? <input type='button' onclick='acceptGoogleCookies()' value='Accept' /> or <input type='button' onclick='refusGoogleCookies()' value='Refuse' /></p></div>").appendTo( "body" );
    }
    Plugin Author Sed Lex

    (@sedlex)

    Actually, I needed to see the whole code and I will need a screenshot of the parameter you set for this plugin

    Thks

    a link would be very helpful

    Plugin Author Sed Lex

    (@sedlex)

    Perhaps I found the issue 🙂

    Try with the next version

    Thread Starter Douglas “BearlyDoug” Hazard

    (@bearlydoug)

    I didn’t set any parameters… but this didn’t happen until last night after I updated everything to the latest versions.

    Since this is a client’s site, I’m not really at liberty to publicly post a link to it… and have to wait until after business hours before I do any more tinkering with their site. (US EST)

    HA! You responded while I was trying to answer back. I’ll watch for the update (WP still shows 1.4.2)

    Plugin Author Sed Lex

    (@sedlex)

    1.4.3 will be availble in few minutes… be patient

    Thread Starter Douglas “BearlyDoug” Hazard

    (@bearlydoug)

    Beaucoup beaucoup BEAUCOUP de grâce, mon ami!

    That fix worked PERFECTLY!

    Thread Starter Douglas “BearlyDoug” Hazard

    (@bearlydoug)

    Marking resolved. 😀

    Plugin Author Sed Lex

    (@sedlex)

    Great!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Javascript conflict with NexGen Gallery & Complexity2 theme’ is closed to new replies.