Slider Widget(AsdSlider)在网站上导致Javascript错误

时间:2014-10-26 17:37:17

标签: javascript jquery impresspages

使用插件Slider Widget(AsdSlider)我在任何浏览器的控制台中都会收到此错误。 它发生在所有不包含已放置的AsdSlider内容元素的页面上:

Uncaught ReferenceError: asdSliderList is not defined 

更多详情:

  (anonymous function) in contactpage:274
  j              ipCore.min.js?8:53
  k.fireWith     ipCore.min.js?8:55
  n.extend.ready ipCore.min.js?8:55
  I              ipCore.min.js?8:55

有人知道这可能是什么吗? 这会导致以下插件停止工作。

看起来插件中的这个定义不起作用:

<?php
namespace Plugin\AsdSlider;

class Event {
  public static function ipBeforeController() {
    ...
    if( !ipIsManagementState() ) {
      $script = "
        $(document).ready(function() {
          if( asdSliderList != undefined && asdSliderList.length > 0 ) {
            $.each( asdSliderList, function( key, value ) {
              $( value.id ).bxSlider( value.options );
            });
          }
        });
      "; 
      ipAddJsContent('asdslider', $script);
    }
  }
}

IP 4.2.2至4.2.6存在问题

谢谢!

1 个答案:

答案 0 :(得分:0)

随着最新的更新我修复了这个bug。您可以在Event.php中自行更新插件或更新一行

asdSliderList != undefined

typeof asdSliderList != 'undefined'
相关问题