Tagged: Plugin Conflict
-
AuthorPosts
-
September 9, 2019 at 11:33 am #1135913
we are having a conflict with this plugin https://www.wordpress-estimation-payment-forms.com on this page: https://hhomepage.com/kreditagentur/dev/
as soon as we put in the shortcode to display the form of the plugin on the page, the whole page crashes. I contacted the plugin support then, they replied that the conflict comes from the enfold script. we are not having any custom script in use, so I don’t know what to do here. can you help out how to fix it?——————PLUGIN SUPPORT———————
the conflict sound to come from this theme script :<script type='text/javascript'> jQuery(document).ready(function(){ jQuery(".avia_datepicker").datepicker({ beforeShow: function(input, inst) { jQuery("#ui-datepicker-div").addClass(this.id); inst.dpDiv.addClass("avia-datepicker-div"); }, showButtonPanel: true, closeText: AviaDatepickerTranslation.closeText, currentText: AviaDatepickerTranslation.currentText, nextText: AviaDatepickerTranslation.nextText, prevText: AviaDatepickerTranslation.prevText, monthNames: AviaDatepickerTranslation.monthNames, monthNamesShort: AviaDatepickerTranslation.monthNamesShort, dayName: AviaDatepickerTranslation.dayNames, dayNamesShort: AviaDatepickerTranslation.dayNamesShort, dayNamesMin: AviaDatepickerTranslation.dayNamesMin, dayNames: AviaDatepickerTranslation.dayNames, dateFormat: AviaDatepickerTranslation.dateFormat, firstDay: AviaDatepickerTranslation.firstDay, isRTL: AviaDatepickerTranslation.isRTL, changeMonth: true, changeYear: true, yearRange: "c-80:c+10" }); }); </script>
It is visible at line 603 of the source code of the page : view-source:https://hhomepage.com/kreditagentur/dev/
But I can’t find it in the theme files .
It should be improved to avoid such conflicts, by replacing it by:<script type='text/javascript'> if(typeof(AviaDatepickerTranslation) != 'undefined'){ jQuery(document).ready(function(){ jQuery(".avia_datepicker").datepicker({ beforeShow: function(input, inst) { jQuery("#ui-datepicker-div").addClass(this.id); inst.dpDiv.addClass("avia-datepicker-div"); }, showButtonPanel: true, closeText: AviaDatepickerTranslation.closeText, currentText: AviaDatepickerTranslation.currentText, nextText: AviaDatepickerTranslation.nextText, prevText: AviaDatepickerTranslation.prevText, monthNames: AviaDatepickerTranslation.monthNames, monthNamesShort: AviaDatepickerTranslation.monthNamesShort, dayName: AviaDatepickerTranslation.dayNames, dayNamesShort: AviaDatepickerTranslation.dayNamesShort, dayNamesMin: AviaDatepickerTranslation.dayNamesMin, dayNames: AviaDatepickerTranslation.dayNames, dateFormat: AviaDatepickerTranslation.dateFormat, firstDay: AviaDatepickerTranslation.firstDay, isRTL: AviaDatepickerTranslation.isRTL, changeMonth: true, changeYear: true, yearRange: "c-80:c+10" }); }); } </script>
- This topic was modified 5 years, 3 months ago by Mike.
September 10, 2019 at 6:20 pm #1136668Hey Mike,
The code is in this file /enfold/framework/php/class-form-generator.php, you can copy it to your child theme and make changes there.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.