2012-06-25 2 views
0

저는 우리의 모든 웹 사이트에서 쿠키 eu 법률 스크립트를 배포했습니다. 나는이 웹 사이트에 도착할 때까지 모두 잘 작동했습니다쿠키 EU 스크립트가 다른 Wordpress 플러그인과 충돌합니다

http://www.ukhealthgateway.com/

를 그냥로드되지 않습니다 어떤 이유로. 나는 그것이 플러그인과 충돌하고 있다고 생각한다. 누군가 볼 수 있니?

는 워드 프레스가 머리에 출력이 무엇 :

<head profile="http://gmpg.org/xfn/11"> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<title>National Health Service market access &amp; entry - UK HealthGateway UK HealthGateway</title> 
<link rel="stylesheet" href="http://www.ukhealthgateway.com/wp-content/themes/default/style.css" type="text/css" media="screen" /> 
<link rel="pingback" href="http://www.ukhealthgateway.com/xmlrpc.php" /> 
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300,700' rel='stylesheet' type='text/css'> 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> 
<script type="text/javascript" src="http://www.ukhealthgateway.com/wp-content/themes/default/cookie_law.js"></script> 
<script type="text/javascript"> 

    $(document).ready(function(){ 
     $('body').cwAllowCookies(); 
    }); 

</script> 


<!-- This site is optimized with the Yoast WordPress SEO plugin v1.1.5 - http://yoast.com/wordpress/seo/ --> 
<meta name="description" content="Selling to the UK National Health Service is challenging and time consuming. UK HealthGateway gives you the solutions and services to quickly and cost-effectively win sales."/> 
<link rel="canonical" href="http://www.ukhealthgateway.com/" /> 
<meta name="google-site-verification" content="9topKAjyLtAge98viaRrfR2QaeQEAdHk4WI_aMDlD-Q" /> 
<!--/Yoast WordPress SEO plugin. --> 

<link rel="alternate" type="application/rss+xml" title="UK HealthGateway &raquo; Feed" href="http://www.ukhealthgateway.com/feed/" /> 
<link rel="alternate" type="application/rss+xml" title="UK HealthGateway &raquo; Comments Feed" href="http://www.ukhealthgateway.com/comments/feed/" /> 

    <script type="text/javascript">//<![CDATA[ 
    // Google Analytics for WordPress by Yoast v4.2.3 | http://yoast.com/wordpress/google-analytics/ 
    var _gaq = _gaq || []; 
    _gaq.push(['_setAccount','']); 
    _gaq.push(['_trackPageview']); 
    (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); 
    })(); 
    //]]></script> 
<link rel="alternate" type="application/rss+xml" title="UK HealthGateway &raquo; Home Comments Feed" href="http://www.ukhealthgateway.com/home/feed/" /> 
<link rel='stylesheet' id='jigoshop_frontend_styles-css' href='http://www.ukhealthgateway.com/wp-content/plugins/jigoshop/assets/css/frontend.css?ver=3.3.1' type='text/css' media='all' /> 
<link rel='stylesheet' id='jqueryui_styles-css' href='http://www.ukhealthgateway.com/wp-content/plugins/jigoshop/assets/css/ui.css?ver=3.3.1' type='text/css' media='all' /> 
<link rel='stylesheet' id='jigoshop_fancybox_styles-css' href='http://www.ukhealthgateway.com/wp-content/plugins/jigoshop/assets/css/fancybox.css?ver=3.3.1' type='text/css' media='all' /> 
<link rel='stylesheet' id='nivoStyleSheet-css' href='http://www.ukhealthgateway.com/wp-content/plugins/nivo-slider-light/nivo-slider.css?ver=3.3.1' type='text/css' media='all' /> 
<link rel='stylesheet' id='nivoCustomStyleSheet-css' href='http://www.ukhealthgateway.com/wp-content/plugins/nivo-slider-light/custom-nivo-slider.css?ver=3.3.1' type='text/css' media='all' /> 
<link rel='stylesheet' id='tribe-events-calendar-style-css' href='http://www.ukhealthgateway.com/wp-content/plugins/the-events-calendar/resources/events.css?ver=3.3.1' type='text/css' media='all' /> 
<script type='text/javascript' src='http://www.ukhealthgateway.com/wp-includes/js/jquery/jquery.js?ver=1.7.1'></script> 
<script type='text/javascript' src='http://www.ukhealthgateway.com/wp-content/plugins/nivo-slider-light/jquery.nivo.slider.pack.js?ver=3.3.1'></script> 
<script type='text/javascript' src='http://www.ukhealthgateway.com/wp-content/plugins/jigoshop/assets/js/jquery.fancybox-1.3.4.pack.js?ver=1.0'></script> 
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js?ver=1.0'></script> 
<script type='text/javascript' src='http://www.ukhealthgateway.com/wp-content/plugins/jigoshop/assets/js/jigoshop_frontend.js?ver=1.0'></script> 
<script type='text/javascript' src='http://www.ukhealthgateway.com/wp-content/plugins/jigoshop/assets/js/script.js?ver=1.0'></script> 
<script type='text/javascript' src='http://www.ukhealthgateway.com/wp-content/plugins/the-events-calendar/resources/jquery.pjax.js?ver=3.3.1'></script> 
<script type='text/javascript' src='http://www.ukhealthgateway.com/wp-content/plugins/the-events-calendar/resources/events.js?ver=3.3.1'></script> 
<script type='text/javascript' src='http://www.ukhealthgateway.com/wp-includes/js/comment-reply.js?ver=20090102'></script> 
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.ukhealthgateway.com/xmlrpc.php?rsd" /> 
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.ukhealthgateway.com/wp-includes/wlwmanifest.xml" /> 
<meta name="generator" content="WordPress 3.3.1" /> 
<script type="text/javascript"> 
/* <![CDATA[ */ 
    jQuery(document).ready(function($){ 
     $(".nivoSlider br").each(function(){ // strip BR elements created by Wordpress 
      $(this).remove(); 
     }); 
     $('.nivoSlider').nivoSlider({ 
      effect:'fade', //Specify sets like: 'random,fold,fade,sliceDown' 
      // All effects: 
      // sliceDown, sliceDownLeft, sliceUp, sliceUpLeft, sliceUpDown 
      // sliceUpDownLeft, fold, fade, random, slideInRight, 
      // slideInLeft, boxRandom, boxRain, boxRainReverse, boxRainGrow 
      // boxRainGrowReverse 
      animSpeed:500, //Slide transition speed 
      pauseTime:6000, 
      startSlide:0, //Set starting Slide (0 index) 
      directionNav:true, //Next & Prev 
      directionNavHide:true, //Only show on hover 
      controlNav:false, //1,2,3... 
      controlNavThumbs:false, //Use thumbnails for Control Nav 
      controlNavThumbsFromRel:false, //Use image rel for thumbs 
      controlNavThumbsSearch: '.jpg', //Replace this with... 
      controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src 
      keyboardNav:true, //Use left & right arrows 
      pauseOnHover:true, //Stop animation while hovering 
      manualAdvance:false, //Force manual transitions 
      captionOpacity:0.8, //Universal caption opacity 
      beforeChange: function(){}, 
      afterChange: function(){}, 
      slideshowEnd: function(){} //Triggers after all slides have been shown 
     }); 
    }); 
/* ]]> */ 
</script> 

</head> 

UPDATE : 그것은 Nivoslider 후로드 그래서 난 당신이 제안하는 일에 이동 했어 은 (jQuery를 1.4.2을 제거, 쿠키 스크립트를 이동 $를 jQuery로 변경). 여전히로드되지 않습니다. 예를 들어 teamworksdesign.com에서 똑같은 스크립트를 사용하고 있습니다. 그 차이는 Wordpress 3.1.3을 사용하는 것으로 보이지만 내 질문에있는 사이트는 3.3.1을 사용합니다. IE7에서도 작동하지만 최신 브라우저에서는 작동하지 않습니다.

+0

@ JamesAllardice 모든 다른 장소에서 시도했지만 여전히 실행되지 않습니다. 페이지 상단에 노란색 막대가 나타나야합니다. – Rob

+0

사이트를 변경했기 때문에 마지막 코멘트를 삭제했습니다. 하지만 문제는 어딘가에서'noConflict'를 호출하는 것처럼 보입니다. '$'호출을 변경하여 대신'jQuery'를 사용하십시오. –

+0

@JamesAllardice 나는 그것도 변경했지만 영향을 미치지 않는 것 같습니다. – Rob

답변

1

좋아, 코드를 머리에 똑바로 삽입 한 것처럼 보입니다. Wordpress 설치와 함께 제공되는 jQuery 라이브러리는 페이지 (버전 1.7.1) 아래로 대기열에 추가되므로 jQuery 1.4.2도 추가 할 필요가 없습니다. 그럴 수도 있습니다.

가 다른 스크립트 (jQuery를 UI와 Nivoslider가이 큐에 넣어되고있다)와 함께 제대로 functions.php에서 쿠키 스크립트를 대기열에 가치가있을 수없는 경우. 제임스 Allardice 언급, 당신은 그럼 그냥 닫는 헤드 태그 앞에 Nivoslider을 설정하는 온로드 스크립트에

$('body').cwAllowCookies(); 

을 추가 할 수 있습니다, 그것은 jQuery를 사용하고()가 아니라 $ 이상().

+0

건설적인 답변 주셔서 감사합니다. 나는 당신이 제안한 것을 수행했다. (jQuery 1.4.2 제거, 쿠키 스크립트 이동으로 인해 Nivoslider를로드하고 $를 jQuery로 바꿨다.) 여전히로드되지 않습니다. 예를 들어 http://www.teamworksdesign.com에서 똑같은 스크립트를 사용하고 있으며 정상적으로 작동합니다. 그 차이는 Wordpress 3.1.3을 사용하는 것으로 보이지만 내 질문에있는 사이트는 3.3.1을 사용합니다. – Rob

+0

실제로는 모두 작동합니다 (snese로). Chrome Dev Tools 또는 Firebug에서 코드를 확인하면 JS가 모든 올바른 코드를 DOM에 성공적으로 추가하고 있음을 알 수 있습니다.표시되지 않는 이유는 .cwcookielaw .cwcookiesmoreinfo {}에 대해 display :가 none으로 설정 되었기 때문입니다. 그것은 내가 제안하는 WP 버전과 관련이 없지만 플러그인을 하나씩 비활성화하는 것을 두 번 다시 확인하십시오. – McNab

+0

완벽하게 작동하는 다른 사이트에서 사용 된 코드와 정확히 동일하므로 추측하면 플러그인/wp입니다. 그냥 주변을 둘러 보려고합니다. – Rob

0

일부 쿠키 보안 모듈은 cookie.js를 포함하는 파일 이름을 찾고 파일을 제공하지 않습니다.

나는 드루팔에서이 문제를 했어 그리고 난 그것을 문서화 this thread을 발견했다.

+0

Wordpress를 사용하는 다른 웹 사이트에서 플러그인을 약간 다르게 설정 했으므로 어딘가에서 문제를 일으키는 플러그인입니다. – Rob

+0

다른 사이트가 동일한 서버에서 호스팅됩니까? 그렇지 않다면 내가 말한 것처럼 여전히 있을지 모릅니다. –

+0

예. 동일한 서버입니다. – Rob

관련 문제