By Justin Throngard on Tuesday, 11 February 2014
Posted in General Issues
Replies 12
Likes 0
Views 1K
Votes 0
My site just launched and I am having troubles with the commenting system. Before launch all was fine but now it isn't working. The ajax just spins and the comment doesn't get saved in the database.

Try to post a comment: http://www.gll-getalife.com/entry/powerhouse-herbs-spices-the-a-list-carbohydrates#comments

I need help with this ASAP please.
It works because I changed the hack code. For other users, edit /components/com_easyblog/easyblog.php:

Add:
$view 		= JRequest::getVar( 'view' );

if( !JFile::exists( EBLOG_ROOT . DS . 'views' . DS . $view . DS . 'view.html.php' ) )
{
JError::raiseError(404, JText::_('View not found'));
}


Directly under the line:
$document->addHeadLink( $wlwLink , 'wlwmanifest' , 'rel' , array( 'type' => 'application/wlwmanifest+xml' ) );


Cures the problem.
·
Wednesday, 12 February 2014 00:25
·
0 Likes
·
0 Votes
·
0 Comments
·
They are now working with the latest version. Marked resolved.
·
Tuesday, 11 February 2014 03:03
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Justin,

Thanks for updating Glad that your issues are resolved now.
·
Tuesday, 11 February 2014 03:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Scratch that. They aren't working. I just tried on a different post.

http://www.gll-getalife.com/entry/all-about-gluten
·
Tuesday, 11 February 2014 03:24
·
0 Likes
·
0 Votes
·
0 Comments
·
AHA!!! I found the problem but it creates another problem.

So I have the Joomla frontpage set to Easyblog. I also have a ton of redirects setup on the site. So I've needed to add the code from this post:

http://stackideas.com/forums/easyblog-and-joomla-redirect-component

When I updated the site to the newest version, the hack here was overwritten. So then I tested the comment system. All worked. Then I added the hack to /components/com_easyblog/easyblog.php. That then made the comment system not work. Then I removed the hack and tried to comment. It then worked again. So it's definitely the hack to make the 404 and redirect component work.

I HAVE to have the native Joomla redirect work AND the frontpage set to EasyBlog AND the commenting system work. Please help ASAP.
·
Tuesday, 11 February 2014 03:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello? I really need a fix to this. I currently have no working commenting system.
·
Tuesday, 11 February 2014 07:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Justin,

There's a whole bunch of javascript errors on your page as you can see here, http://screencast.com/t/KXIw7TZHCx . I believe the javascript errors are causing a chain effect as other javascripts are not rendered on the page since it automatically breaks when there's an error.
·
Tuesday, 11 February 2014 11:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Guys, I disabled the plugin that was causing the JS errors. It's intention is to prevent saving images and disables the copy of text. Those JS errors are SUPPOSED to be there. However, for your purposes I have disabled it. The problem still persists. I again tested the comments with the hack (which I need so the Joomla redirect system works or a better solution to make redirects work from you guys when Easyblog is set as the homepage) and they don't work. Remove the hack and the comments system works. Please help.

Here is the hack loaded in /components/com_easyblog/easyblog.php at line 134

<?php
$mainframe->close();
}
else
{
/// check the format...else the ajax will failed.
$document = JFactory::getDocument();
$doc_type = $document->getType();

if($doc_type == 'html')
{
$attribs = array('type' => 'application/rsd+xml', 'title' => 'RSD');

$xmlLink = JRoute::_('index.php?option=com_easyblog&rsd=RealSimpleDiscovery');
$document->addHeadLink($xmlLink, 'EditURI', 'rel', $attribs);

$wlwLink = rtrim( JURI::root() , '/' ) . '/components/com_easyblog/classes/wlwmanifest.xml';
$document->addHeadLink( $wlwLink , 'wlwmanifest' , 'rel' , array( 'type' => 'application/wlwmanifest+xml' ) );
}
}
$view = JRequest::getVar( 'view' );

if( !JFile::exists( EBLOG_ROOT . DS . 'views' . DS . $view . DS . 'view.html.php' ) )
{
JError::raiseError(404, JText::_('View not found'));
}
// Get controller name if specified
$controllerName = JRequest::getCmd( 'controller' , '' );

// Create controller
$controller = EasyBlogController::getInstance( $controllerName );

// Perform the Request task
$controller->execute( JRequest::getCmd('task', null, 'default') );

// Redirect if set by the controller
$controller->redirect();
·
Tuesday, 11 February 2014 12:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Justin,

When I try to post a comment now, it does seem to work. There are no more js errors on the page. See my screen shot here, http://screencast.com/t/w1SLK1vb
·
Tuesday, 11 February 2014 14:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Ah, okay. I am not sure why those hacks were messing with the comments but glad that your issues are resolved now
·
Wednesday, 12 February 2014 00:43
·
0 Likes
·
0 Votes
·
0 Comments
·
It has something to do with Ajax - see line 6 of the above posted code
/// check the format...else the ajax will failed.


I'm guessing that were it had originally been placed was causing Ajax not to finish what it was doing anywhere on the Easyblog side of things (not specific to comments). The original thread was really clear on where to post the thread. Hopefully we can get a permanent patch to this 404 problem in the next release.
·
Wednesday, 12 February 2014 00:57
·
0 Likes
·
0 Votes
·
0 Comments
·
I will be refactoring the codes quite a bit on EasyBlog 4.0 and also leave it to Joomla to process the 404 requests rather than redirecting our own.
·
Wednesday, 12 February 2014 01:29
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post