Hi, i had strange issue with Jcomments 2.3.0
I found that comments are not visible in Chrome. There was "new comment" submit form, but there were no earlier comments. I mean there were no comments at all in source code, it's not CSS issue. I'm sure there should be some comments, because i saw them in backend AND they were visible in Firefox/Opera as well.
I tried to debug this. First of all i saw ajax call for posts in Firefox, but there was no ajax call in Chrome. I had some errors in Chrome console log, from third party javascipts (ja.ddmod.js from Teline III and some error in mod_janewsticker javascript) so i disabled them for a while. Nothing happend. So i tried to debug Jcomments js.
What i have found is:
initOnReady : function(){if(this.isReadyInited) return;this.isReadyInited=1;var jc=this;
if(this.browser.mozilla||this.browser.opera){JCommentsEvents.prototype.add(document, 'DOMContentLoaded',jc.ready);}
else if(this.browser.msie) {(function(){try{document.documentElement.doScroll('left');}catch(e){setTimeout(arguments.callee, 50);return;}jc.ready();})();}
else if(this.browser.safari){(function(){if(jc.isReady)return;
if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}jc.ready();})();}
JCommentsEvents.prototype.add(window, 'load', function(){jc.ready(jc);});
},
in ~275 line jcomments-v2.3.js
Could you explain why there is no IF-THEN for Chrome browser? I though maybe there is no need for this case... but as a test i added
else{JCommentsEvents.prototype.add(document, 'DOMContentLoaded',jc.ready);}
Refresh and... comments appears. WTF?
I cant find many "Jcomments doesnt work in chrome" topics, so its hard to belive for me, that this IF-THEN case is necessery here. But it helped, at least in my case. Any suggestions why does it happend?
Joomla 1.5.15
Jcomments 2.3.0
Chrome 20.0.1132.57