2.4 Update Comment Problem

9.07K viewsUpdates
0

Comment section is not working for any asked question. It always redirects any entry as an answer not a comment. Please help.

0

comments not work with the7 theme and I see this log:

PHP Fatal error:  Call to undefined function presscore_get_button_html() in /home/shivahos/domains/shivahost.net/public_html/wp-content/themes/dt-the7/functions.php on line 1141

also add image via link have conflict with plagins.js accordion toggle part!

This issue is happening due to smooth scroll. This prevents click on comment button. Please chek in you theme JS if there is any smooth scroll code and remove it.

I removed smooth scroll section from JS file nothing chaged!

as I said accordion toggle part of js has conflict! and I cant remove it!

this script has problem with “add image form link” :

(function(e,t,n){var r=t.event;var i=0;t.Accordion=function(e,n){this.$el=t(n);this.$items=this.$el.children(“ul”).children(“li”);this.itemsCount=this.$items.length;this._init(e)};t.Accordion.defaults={open:-1,oneOpenedItem:false,speed:600,easing:”easeInOutExpo”,scrollSpeed:900,scrollEasing:”easeInOutExpo”};t.Accordion.prototype={_init:function(e){this.options=t.extend(true,{},t.Accordion.defaults,e);this._validate();this.current=this.options.open;this.$items.find(“div.st-content”).hide();this._saveDimValues();if(this.current!=-1)this._toggleItem(this.$items.eq(this.current));this._initEvents()},_saveDimValues:function(){this.$items.each(function(){var e=t(this);e.data({originalHeight:e.find(“a:first”).height(),offsetTop:e.offset().top})})},_validate:function(){if(this.options.openthis.itemsCount-1)this.options.open=-1},_initEvents:function(){var n=this;this.$items.find(“a:first”).bind(“click.accordion”,function(e){var r=t(this).parent();if(n.options.oneOpenedItem&&n._isOpened()&&n.current!==r.index()){n._toggleItem(n.$items.eq(n.current))}n._toggleItem(r);return false});n.$el.find(“li”).each(function(){var e=t(this);e.css(“height”,e.data(“originalHeight”))});t(e).bind(“debouncedresize”,function(e){n._saveDimValues();n.$el.find(“li”).not(“.st-open”).each(function(){var e=t(this);e.css(“height”,e.data(“originalHeight”))});n.$el.find(“li.st-open”).each(function(){var e=t(this);e.css(“height”,e.data(“originalHeight”)+e.find(“div.st-content”).outerHeight(true))})})},_isOpened:function(){return this.$el.find(“li.st-open”).length>0},_toggleItem:function(e){i++;var t=this;var n=e.find(“div.st-content”);e.hasClass(“st-open”)?(this.current=-1,n.stop(true,true).fadeOut(this.options.speed),e.removeClass(“st-open”).stop().animate({height:e.data(“originalHeight”)},this.options.speed,this.options.easing,function(){if(i>1){t._scroll()}})):(this.current=e.index(),n.stop(true,true).fadeIn(this.options.speed),e.addClass(“st-open”).stop().animate({height:e.data(“originalHeight”)+n.outerHeight(true)},this.options.speed,this.options.easing,function(){}))},_scroll:function(n){var n=n||this,r;n.current!==-1?r=n.current:r=n.$el.find(“li.st-open:last”).index();if(e.innerWidth<760){t("html, body").stop().animate({scrollTop:n.$items.eq(r).offset().top},n.options.scrollSpeed,n.options.scrollEasing)}}};var s=function(e){if(this.console){console.error(e)}};t.fn.dtAccordion=function(e){if(typeof e==="string"){var n=Array.prototype.slice.call(arguments,1);this.each(function(){var r=t.data(this,"accordion");if(!r){s("cannot call methods on accordion prior to initialization; "+"attempted to call method '"+e+"'");return}if(!t.isFunction(r[e])||e.charAt(0)==="_"){s("no such method '"+e+"' for accordion instance");return}r[e].apply(r,n)})}else{this.each(function(){var n=t.data(this,"accordion");if(!n){t.data(this,"accordion",new t.Accordion(e,this))}})}return this};var i=0;t.Toggle=function(e,n){this.$el=t(n);this.$items=this.$el;this.itemsCount=this.$items.length;this._init(e)};t.Toggle.defaults={open:-1,oneOpenedItem:false,speed:600,easing:"easeInOutExpo",scrollSpeed:900,scrollEasing:"easeInOutExpo"};t.Toggle.prototype={_init:function(e){this.options=t.extend(true,{},t.Toggle.defaults,e);this._validate();this.current=this.options.open;this.$items.find("div.st-toggle-content").hide();this._saveDimValues();if(this.current!=-1)this._toggleItem(this.$items.eq(this.current));this._initEvents()},_saveDimValues:function(){this.$items.each(function(){var e=t(this);e.data({originalHeight:e.find("a:first").height(),offsetTop:e.offset().top})})},_validate:function(){if(this.options.openthis.itemsCount-1)this.options.open=-1},_initEvents:function(){var n=this;this.$items.find(“a:first”).bind(“click.toggle”,function(e){var r=t(this).parent();if(n.options.oneOpenedItem&&n._isOpened()&&n.current!==r.index()){n._toggleItem(n.$items.eq(n.current))}n._toggleItem(r);return false});n.$el.each(function(){var e=t(this);e.css(“height”,e.data(“originalHeight”))});t(e).bind(“debouncedresize”,function(e){n._saveDimValues();n.$el.not(“.st-open”).each(function(){var e=t(this);e.css(“height”,e.data(“originalHeight”))});n.$el.each(function(){if(t(this).hasClass(“st-open”)){var e=t(this);e.css(“height”,e.data(“originalHeight”)+e.find(“div.st-toggle-content”).outerHeight(true))}})})},_isOpened:function(){return this.$el.is(“.st-toggle-open”).length>0},_toggleItem:function(e){i++;var t=this;var n=e.find(“div.st-toggle-content”);e.hasClass(“st-open”)?(this.current=-1,n.stop(true,true).fadeOut(this.options.speed),e.removeClass(“st-open”).stop().animate({height:e.data(“originalHeight”)},this.options.speed,this.options.easing,function(){if(i>1){t._scroll()}})):(this.current=e.index(),n.stop(true,true).fadeIn(this.options.speed),e.addClass(“st-open”).stop().animate({height:e.data(“originalHeight”)+n.outerHeight(true)},this.options.speed,this.options.easing,function(){if(i>1){t._scroll()}}))},_scroll:function(n){var n=n||this,r;n.current!==-1?r=n.current:r=n.$el.find(“li.st-open:last”).index();if(e.innerWidth<760){t("html, body").stop().animate({scrollTop:n.$items.eq(r).offset().top},n.options.scrollSpeed,n.options.scrollEasing)}}};var s=function(e){if(this.console){console.error(e)}};t.fn.toggle=function(e){if(typeof e==="string"){var n=Array.prototype.slice.call(arguments,1);this.each(function(){var r=t.data(this,"toggle");if(!r){s("cannot call methods on toggle prior to initialization; "+"attempted to call method '"+e+"'");return}if(!t.isFunction(r[e])||e.charAt(0)==="_"){s("no such method '"+e+"' for toggle instance");return}r[e].apply(r,n)})}else{this.each(function(){var n=t.data(this,"toggle");if(!n){t.data(this,"toggle",new t.Toggle(e,this))}})}return this}})(window,jQuery)

1

Probably JS conflict with DIVI.

Please tell divi author about it, I am sure they can help.

0

Divi is one of the most widely used themes. I hope the development team of anspress do fix this comment issue.

I highly doubt it’s a widely used theme, because IT’S PAID.
I tried to download it to try to help you, but you have no luck – your widely used theme is not wide enough. Nothing we can do here, you have to contact divi developers.

0

with some themes it doesn’t work. I use divi theme and comments don’t work either.

Same here. I also use Divi theme it does not work

1

It works for me.
You either have set options related to comments (disable comments?), or you may have some javascript issues.

As usual with anspress, uninstalling and installing it might help. Don’t forget to backup.

Dima thank you for your attention however like above answer I use also Divi theme and that comment option does not work at all

So you know it works with default theme, but doesn’t with Divi? Then it’s simple. Go find what conflicts. It may be JS like I said in answer (you checked it? you have no JS errors in console?). Otherwise, go to your theme functions and look what strange things it does, maybe it overrides some methods, or uses some filters/actions. If you don’t know programming, try deleting them 1 by 1. Design of your Divi theme will fall apart, but sooner or later AnsPress should start working.

That’s if you want to solve it yourself. If you want AnsPress staff to figure it out, then I can’t help, you’ll have to rely on Rahul 🙂