Hey everyone,
I’m using the Weever extension for nested comments http://studio625.com/ee/weever/
I noticed that after installing Weever, any comments that are Closed status in EE are now appearing on our site. I’m guessing this is related to Weever and therefore isn’t supported by EE, but is there anything else I can check?
Closed comments should not appear right? Some of them are nasty spam and I’m deleting them now, but am afraid they will continue.
Thanks, Scott
I’ve not used the Weever extension so not exactly sure what it does but are you able to disable it and still have the commenting system work and show the existing comments without it?
Might be good to check if the comments still show up without it enabled. Failing that I would create a new test template and just use stock ExpressionEngine tags to show your comment entries and see if they still show up then. If they do then you may have something else going on in your system. If not then I would suggest that getting in touch with the author of the extension would be your best bet here.
If you can check the comments system though without the extension just to rule out ExpressionEngine then that I think would be your best first bet.
Best wishes,
Mark
This may also help. Weever suggest “hacking” the EE file mod.comment.php. Here’s the snippet I had to adjust, maybe something here is wacky?
/*
Begin Weever Hack */
if ($TMPL->fetch_param('weever') == 'on')
{
// -------------------------------------------
// 'comment_entries_modify_wsql' hook.
// - Add conditions to the WHERE clause
//
if ($EXT->active_hook('comment_entries_modify_wsql') === TRUE)
{
$w_sql = $EXT->call_extension('comment_entries_modify_wsql', $w_sql, $entry_id);
if ($EXT->end_script === TRUE) return;
}
//
// -------------------------------------------
$query = $DB->query("
SELECT comment_date, comment_id
FROM exp_comments
WHERE entry_id = '".$DB->escape_str($entry_id)."'".
$w_sql."
ORDER BY ".$order_by
);
}
else
{
if ( ! $dynamic)
{
// When we are only showing comments and it is not based on an entry id or url title
// in the URL, we can make the query much more efficient and save some work.
if ($show_trackbacks === FALSE)
{
$this_page = ($current_page == '' || ($limit > 1 AND $current_page == 1)) ? 0 : $current_page;
$this_sort = (strtolower($sort) == 'desc') ? 'DESC' : 'ASC';
$sql = "SELECT comment_date, comment_id FROM exp_comments
WHERE status = 'o' ".$w_sql."
ORDER BY ".$order_by." ".$this_sort."
LIMIT {$this_page}, ".$limit;
$query = $DB->query($sql);
$count_query = $DB->query("SELECT COUNT(*) AS count FROM exp_comments WHERE status = 'o' ".$w_sql);
$total_rows = $count_query->row['count'];
}
else
{
$sql = "SELECT comment_date, comment_id FROM exp_comments WHERE status = 'o' ".$w_sql." ORDER BY ".$order_by;
}
$query = $DB->query($sql);
}
else
{
$query = $DB->query("SELECT comment_date, comment_id FROM exp_comments WHERE entry_id = '".$DB->escape_str($entry_id)."' AND status = 'o' ORDER BY ".$order_by);
}
}
/*
End Weever Hack */
Ok, I created a test template that displays all the comments in my weblog. I Closed one of my comments and it did not display using the default EE comment entries tag. However, that same comment did appear in my other template where I have Weever turned on. So my EE comment entries is not the issue.
Next I’ll try toggling Weever on/off to see if that has an affect.
Update. If I toggle Weever off (either by disabling it in EE extensions or through the code weever=”off”) the Closed comment still shows up. However, if I revert back to the EE original file mod.comment.php, the Closed comment does NOT appear and Weever works ok. The “hack” is highly recommended, but not if it’s buggy!
Any way to strengthen the “hack” to not break EE comments? Maybe I can do without the hack since we don’t get that many comments?
http://studio625.com/ee/weever/installation_and_setup/
So I’m not going to hack the mod.comment.php in order to keep Closed comments from appearing. However, I now seem to have another issue.
A non-logged in user cannot post a comment without the comment either being held for moderation or the “can’t post comment at this time” message appearing. However, when I log in and post a comment everything works fine. My guess is this is also related to the Weever extension, but is there anything other test I can try to debug this issue?
Maybe I can use a test weblog to try and post comments as a non-logged in user.
Update: The specific error I get after trying to submit a comment is the following.
The form you submitted contained the following errors
* Your input cannot be processed right now, so it will be moderated first.
Return to Previous Page
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.