PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, January 2, 2022

[FIXED] Yii echmultiselect showing error on console and not working

 January 02, 2022     javascript, jquery, yii     No comments   

Issue

I was following the Option no 3 here https://www.yiiframework.com/extension/echmultiselect#3-use-as-a-filter-in-cgridview to add multiselect dropdown on my Yii project. But it is showing,

jquery.js:6920 Uncaught TypeError: jQuery.easing[this.easing] is not a function at init.run (jquery.js:6920)

On my cgridview, this is the column that has to be multiple select checkbox,

array (
                'name'=>'brand_id',
                'filter'=> $this->widget('ext.EchMultiSelect.EchMultiSelect', array(
                    'model' => $model,
                    'dropDownAttribute' => 'brand_id',
                    'data' => CHtml::listData(Brands::model()->findAll(array("order" => "sortOrder")), 'id', 'name'),
                    'options' => array('buttonWidth' => 80, 'ajaxRefresh' => true,'filter'=>true),
                ),
                    true // capture output; needed so the widget displays inside the grid
                ),
           ),

On my layout,

I've included the jquery,

<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>

Dropdown page:

enter image description here

Because of that jQuery.easing[this.easing] is not a function error the multi-select functionality is not working, as per the suggestion here: https://stackoverflow.com/a/12592301/1138192 I've added the jquery UI also but it doesn't work even it breaks the existing dropdown.

Error on the console:

enter image description here


Solution

The problem is in jquery.multiselect.js (EchMultiSelect-v1.3) as the effect method arguments are inverted (at least for the current jQuery version):

.show( effect, speed ) and .hide( effect, speed ) on lines 566, 573, 600 should be replaced by the correct order .show( speed, effect ) and .hide( speed, effect ).



Answered By - Fabian Horlacher
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing