I have currently some crazy trouble with MixItUp 3.
I'm using the same Script and functions on the home page and also the subpages.
But only on home there will be a warning after the first filter process "WARNING: An operation was requested but the MixItUp instance was busy. The operation was rejected because the queue is full or queuing is disabled.".
The same script is also on subpages with the same data, but there it works fine.
Website: https://www.busse-miessen.de/relaunch-2018/#anwaelte
Script: https://www.busse-miessen.de/relaunch-2018/wp-content/themes/busse-miessen/js/main.js
Here you can find the most important part of the script:
var containerEl = document.querySelector('.media_list');
var mixer = mixitup(containerEl);
jQuery('#cat-expertise, #cat-rechtsgebiete').on('selectric-change change', function(e){
if( mixer.isMixing() ) {
console.log('isMixing: ' + mixer.isMixing());
//return;
}
var $val = jQuery('#cat-expertise').val();
var $val2 = jQuery('#cat-rechtsgebiete').val();
console.log('$val: '+ $val +' - - '+'$val2: '+ $val2);
var $filter = false;
if( $val != '0' ) {
//console.log($val);
$filter = '.'+$val;
}
if( $val2 != '0' && $val != '0' ) {
//console.log($val2);
$filter = $filter+', '+'.'+$val2;
} else if( $val2 != '0' ) {
$filter = '.'+$val2;
}
console.log('final filter: '+$filter+' - State: '+mixer.isMixing());
if( $filter ) {
mixer.filter($filter);
} else {
$filter = '.mix';
mixer.filter($filter);
}
});
jQuery('#mix-sorting').on('selectric-change change', function(e){
if( mixer.isMixing() ) {
console.log('isMixing: ' + mixer.isMixing());
//return;
}
var $val = jQuery('#mix-sorting').val();
mixer.sort('name:'+$val);
});
It seems that "mixer.filter($filter);" (main.js #120) could not be finished, because after the first call of filter() the isMixing() function is all the way "true" also after MixItUp has completed.
Example output of the console.log() from above:
main.js:101 $val: cat-bauen-und-immobilien - - $val2: 0
main.js:117 final filter: .cat-bauen-und-immobilien - State: false
main.js:94 isMixing: true
main.js:101 $val: cat-bauen-und-immobilien - - $val2: 0
main.js:117 final filter: .cat-bauen-und-immobilien - State: true
main.js:94 isMixing: true
main.js:101 $val: cat-healthcare - - $val2: 0
main.js:117 final filter: .cat-healthcare - State: true
main.js:94 isMixing: true
main.js:101 $val: cat-healthcare - - $val2: 0
main.js:117 final filter: .cat-healthcare - State: true
main.js:94 isMixing: true
main.js:101 $val: cat-familie - - $val2: 0
main.js:117 final filter: .cat-familie - State: true
plugins.js:48 [MixItUp] WARNING: An operation was requested but the MixItUp instance was busy. The operation was rejected because the queue is full or queuing is disabled.
Please note, that this part is currently only commented out for debugging:
if( mixer.isMixing() ) {
console.log('isMixing: ' + mixer.isMixing());
//return;
}
If I use it with the «return» there, the script stops also working, because "mixer.isMixing()" is true all the time after the first call of filter().