Support ⇒ Dragonfly CMS v10 ⇒ No posts exist for this topic ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexDragonfly CMS v10

No posts exist for this topic Reply to topic


This still happens in V10.

I'm looking at a post now, and I always thought the issue was that the number of posts in the posts table did not equal the number of replies in the bbtopics table.

But for this one.
SELECT count( topic_id ) FROM `mus_bbposts` WHERE topic_id =2698 count(topic_id) 135

SELECT topic_replies FROM `mus_bbtopics` WHERE topic_id =2698 LIMIT 0 , 30 topic_replies 135

They match.
So is this a pagination issue rather than a mismatch of replies?

Edit:
Actually just thinking about this. They should *not* match... topic_replies should be one less than the number of posts, because the first post (the original topic) is not a reply.
Is that right?

I'm going to write a module so that admins can fix this issue without having to hack the DB.
Enter a topic ID and submit. Compare topic_replies with the topic count in bbposts, and if it's not right, fix it.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

Last edited by hybrid on Wed Sep 02, 2015 11:35 pm; edited 1 time in total


My quick hack module for this:

www.mustangtech.com.au...ic.tar.bz2

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


With this query you can check it
SELECT topic_id, topic_replies, COUNT(post_id) - 1 as replies FROM cms_bbtopics LEFT JOIN cms_bbposts USING (topic_id) WHERE topic_archive_flag = 0 AND topic_moved_id = 0 GROUP BY 1, 2 HAVING topic_replies <> replies

This is the query to fix it
UPDATE cms_bbtopics t SET topic_replies = (SELECT COUNT(post_id) - 1 FROM cms_bbposts p WHERE p.topic_id = t.topic_id) WHERE topic_archive_flag = 0 AND topic_moved_id = 0

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Thu Sep 03, 2015 7:38 am; edited 1 time in total


I updated the v10 code to synchronize values better.
It's a big change but does seem to work Smile

bitbucket.org/dragonfl...1c0209bf3e

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Nice work.
Is this sync an admin option, or does it happen automatically?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


both Smile

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Oh nice...
I just did a pull and there's lots of changed files since my last one.

Will need to go through them all carefully, so I don't blow away my own stuff.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


After updating, some of my topic ID's have gone weird in search results.
It looks like when the users put quotation marks in their subjects.

Project & # 039;Patience& # 039; the 64.5 Fastback

I have had to put spaces in because it displays inside the forum.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

Last edited by hybrid on Wed Sep 09, 2015 1:32 am; edited 4 times in total


Did you do: Admin -> Modules -> update forums?

The code has changed to remove the html inside db topic titles

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial

Last edited by DJ Maze on Wed Sep 09, 2015 7:02 am; edited 1 time in total


I don't have that option available.
I did most of the file updates manually because I didn't want to overwrite any changes I have done.

Which files will cause that update button to be available?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Found it... copied the Forums/install directory over and ran the upgrade.
That fixed it, thanks.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

Last edited by hybrid on Wed Sep 09, 2015 11:07 pm; edited 1 time in total


This has come up again on one of the topics on my site, although the post count seems to be correct, so I'm not sure what is going on this time.
Viewing the most recent post:
www.mustangtech.com.au...tml#134919

No posts exist for this topic


There's 270 replies which divides nicely to 18 pages (15 posts per page), but the site is generating 19 pages in pagination.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

Last edited by hybrid on Thu Jan 16, 2020 11:18 pm; edited 1 time in total

All times are UTC


Jump to: