Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Question All post counts now at zero after migration

More
16 years 7 months ago - 16 years 7 months ago #30233 by Matias
mtwMigrator seems to break FireBoard and Kunena installation in a way or another. It's more reliable just to copy all the tables to new site (+ change table collation to UTF-8) and install Kunena.

I just spend some time figuring out how to recalculate user post counts:
Code:
INSERT INTO jos_fb_users (userid, posts) SELECT userid, COUNT(userid) FROM jos_fb_messages WHERE userid>0 AND hold=0 GROUP BY userid ON DUPLICATE KEY UPDATE posts=VALUES(posts)

I will try to do the same for categories soon..
Last edit: 16 years 7 months ago by Matias.

Please Log in or Create an account to join the conversation.

More
16 years 7 months ago - 16 years 7 months ago #30236 by Matias
This category count update will work only IF YOU DO NOT HAVE subcategories:
Code:
INSERT INTO jos_fb_categories (id, numTopics, numPosts) SELECT m.catid, SUM( m.parent=0 ), SUM( m.parent>0 ) FROM jos_fb_messages as m LEFT JOIN jos_fb_categories AS c ON c.id=m.catid WHERE m.catid >0 AND m.hold=0 GROUP BY catid ON DUPLICATE KEY UPDATE numTopics=VALUES(numTopics), numPosts=VALUES(numPosts); INSERT INTO jos_fb_categories (id, numTopics, numPosts) SELECT parent, SUM( numTopics ), SUM( numPosts ) FROM jos_fb_categories WHERE parent > 0 GROUP BY parent ON DUPLICATE KEY UPDATE numTopics=VALUES(numTopics), numPosts=VALUES(numPosts);

If you do have subcategories, the second query is not enough and you need some php magic to sum subcategories and category together to get the right number.. Or you can do it manually in phpmyadmin.
Last edit: 16 years 7 months ago by Matias.

Please Log in or Create an account to join the conversation.

Time to create page: 0.236 seconds