Forums

[SOLVED] Show Comments link in Blog: Critical Errors

nikkie 19 Dec, 2008
The Show Comments link in Blog is really messed up underneath. Approximately 25 lines of extraneous JavaScript is inserted into the page source for each blog item listed in the content pane. One of my blog pages has 60 some articles, which is 60 X 25 = 1,500 lines of extraneous code the browser has to choke down when loading the page. It brings the page load to a crawl. Worse yet, you can't turn it off, even if you opt NOT to Show Comments link in Blog from the Comments Manager's parameters. The code is then fully extraneous and inserted completely in error.
GreyHead 19 Dec, 2008
Hi Nikkie,

There's a fix for the repeated code in the forums here - Max posted a link to it in the last few days.

Bob
nikkie 19 Dec, 2008
Yes, thanks. I couldn't find that at first either. This changes everything. It only loads once now and the page load is back to normal. Thanks for pointing that out for me! It would be nice to have an orderly listing for fixes, etc. in a separate area.

The fix I found for this problem involved a replacement plugin file (/plugins/content/ChronoComments.php) and can be found at http://www.chronoengine.com/forums.html?cont=posts&f=17&t=11304.

While I was searching for that I also found another fix for a problem I reported earlier concerning Blog View Link Action Bad if Zero Comments (http://www.chronoengine.com/forums.html?cont=posts&f=17&t=11998). The description of the fix is not clear at first but it simply involves returning nothing in situations where there are no comments for an article by adding the line (if(!$row->id)return;) to the plugin file (/plugins/content/ChronoComments.php) as shown below:

function plgContentChronocomments( &$row, &$params, $page=0 )
{
	global $mainframe, $addChronoCommentscripts;
	if(!$row->id)return;
This topic is locked and no more replies can be posted.