Skip to content

Commit f17e259

Browse files
Merge pull request #698 from contactashish13/issue-697
Conflict with Modern Events Calendar plugin
2 parents 71083e4 + 4eb59e2 commit f17e259

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

classes/Visualizer/Module/Admin.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,9 @@ public function renderLibraryPage() {
978978
),
979979
'page_type' => 'library',
980980
'is_front' => false,
981+
'i10n' => array(
982+
'conflict' => __( 'We have detected a potential conflict with another component that prevents Visualizer from functioning properly. Please disable any of the following components if they are activated on your instance: Modern Events Calendar plugin, Acronix plugin. In case the aforementioned components are not activated or you continue to see this error message, please disable all other plugins and enable them one by one to find out the component that is causing the conflict.', 'visualizer' ),
983+
),
981984
)
982985
);
983986
// render library page

js/library.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
},
2424

2525
open: function () {
26-
wpmv.MediaFrame.prototype.open.apply(this, arguments);
26+
try{
27+
wpmv.MediaFrame.prototype.open.apply(this, arguments);
28+
}catch(error){
29+
alert(visualizer.i10n.conflict);
30+
}
2731
this.$el.addClass('hide-menu');
2832
}
2933
});
@@ -146,7 +150,7 @@
146150

147151
// if vaction=addnew is found as a GET request parameter, show the modal.
148152
if(location.href.indexOf('vaction=addnew') !== -1){
149-
$('.add-new-chart').trigger('click');
153+
$('.add-new-chart').first().trigger('click');
150154
}
151155

152156
$(window).resize(function () {

0 commit comments

Comments
 (0)