PivotX Support Community

This is the place to discuss bugs that have been found in the most recent version of PivotX. Posting bugs will ensure that the Development Team is aware of them and that they will be addressed when resources are available.

My blog only gets spam comments and as such, I delete them (they never actually appear as I have it set up so they have to be approved). Problem is, the number of comments never gets updated against an entry, so one of my entries still claims to have 80-odd comments.

I've looked into the source code and the problem appears to be in the method called deleteComments in module_comments.php - in here, it deletes the comments from the comments table, but never updates the comment_count column on the entries table.

Hopefully you can include a fix in the next release. Though, (and this will be more work) it would be nice if the number of comments shown against an entry was the number of approved comments, as this may lead to confusion if someone sees 20 comments when PivotX reckons that there are in fact 23, for example.

I am on version 2.3.3 (MySQL) and cannot reproduce your problem. When I moderate a comment by deleting it the total number of comments displayed is lowered. You have a point about the total number while comments are in moderation but as it is displayed together with the existing moderated comments that there are comments to be moderated you could reason that displaying the total number including those to be moderated is correct.So on what version are you?

Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!I can also convert your site to a Wordpress site!

I'm on the same version of PivotX. Hmm, I looked at the code on my laptop last night (not on it now, so will have to look again another time) and it seemed to run an SQL query to delete comments but not update the total on the entries.

To be fair, until I saw that bit of code last night, I'd always thought that updating the total comments remaining after deletion was flaky - meaning it sometimes seemed to work and sometimes it didn't update the total at all and sometimes it updated it, but not to the correct number. Though I wouldn't swear by that, it was just the impression I got an the code seemed to contradict that entirely.

A massive delay, but I think I know what the problem is - I'm not just deleting a comment one by one, I have PivotX setup so that I have to approve comments before they are shown on my site. I then go to the moderate comments section, within admin, click select all and then delete. All the comments are deleted, but the figures within the entries table are not updated.

However, if you delete a comment one by one, the comment count is updated.