okay, cool… hopefully one of us can look in depth tomorrow…
Support Forum
Not sure what is going on for me today at the moment but let’s try something very basic!
Go to the forum admin > toolbox > housekeeping > rebuild indexes. Select your ‘compost bin’ forum, click on the ‘rebuild…’ button and see what happens.
Although I guess I should ask. In the properties dump you pasted above – are you 100% sure that the last post ID for that first topic is incorrect? If you open the actual thread and check the properties for the last post is it different? And if the same – does the date tally as being more recent? Perhaps do that before the re-indexing above…
here is the properties of the last post, it is showing a date of 28 May ’12
3:02 pm
| Group ID | 2 | |
| Group Title | The Outhouse | |
| Forum ID | 5858 | |
| Forum Title | The Compost Bin | |
| Forum Slug | the-compost-bin-1 | |
| Topics in Forum | 1307 | |
| Topic ID | 6622 | |
| Topic Title | Zombie Portraits | |
| Topic Slug | zombie-portraits | |
| Posts in Topic | 4 | |
| Topic Started | 27 May ’12 – 8:36 am | |
| First Post ID | 6622 | |
| Last Post ID | 11102 | |
| This Post ID | 11102 | |
So you may be right in thinking there is something wayward in your post ID data…
Did the index rebuild make any difference?
Take a look at the very last post you or anyone has made on the forums and view the properties of that. What is the post_id. In other words, where are you up to as these are sequentially allocated.
also, I put the recent posts widget in the sidebar on the staging server and set the display for the last 100 posts, it’s still only showing 55, but it is generating this error in the server error logs, not sure if it’s helpful or not
LONG QUERY (1026 characters long generated in wp-content/plugins/simple-press/sp-api/sp-api-wpdb.php:176): SELECT rufus_sftopics.forum_id, forum_name, forum_slug, forum_disabled, rufus_sftopics.topic_id, topic_name, topic_slug, topic_icon, topic_icon_new, rufus_sftopics.post_count, ttttttttrufus_sftopics.post_id, post_status, post_index, post_date, ttttttttguest_name, rufus_sfposts.user_id, post_content, display_name FROM rufus_sftopics JOIN rufus_sfforums ON rufus_sfforums.forum_id = rufus_sftopics.forum_id JOIN rufus_sfgroups ON rufus_sfgroups.group_id = rufus_sfforums.group_id JOIN rufus_sfposts ON rufus_sfposts.post_id = rufus_sftopics.post_id LEFT JOIN rufus_sfmembers ON rufus_sfmembers.user_id = rufus_sfposts.user_id WHERE rufus_sftopics.topic_id IN (33279,33267,33278,33275,33161,33271,33254,33273,33269,33280,32646,32965,10305,33277,33276,33264,33225,33274,33272,33270,33268,33263,33265,33266,9532,33262,33261,8876,33232,33244,33258,33260,33241,33259,33250,33249,33239,33226,10133,33236,33246,31762,33251,33253,33257,33256,33255,33190,33243,33252,33248,33234,33247,33220,33229) ORDER BY rufus_sftopics.post_id DESC,
I did a index rebuild on the staging server and it didn’t do anything, this is the properties of the very last post I made 15 minutes ago
| Group ID | 2 | |
| Group Title | The Outhouse | |
| Forum ID | 5858 | |
| Forum Title | The Compost Bin | |
| Forum Slug | the-compost-bin-1 | |
| Topics in Forum | 1307 | |
| Topic ID | 33328 | |
| Topic Title | I don’t know if I can wait a year |
|
| Topic Slug | i-dont-know-if-i-can-wait-a-year | |
| Posts in Topic | 13 | |
| Topic Started | 28 Nov ’14 – 9:55 pm | |
| First Post ID | 40165 | |
| Last Post ID | 40201 | |
| This Post ID | 40201 | |
| Poster ID | 1 | |
kvr28 said
also, I put the recent posts widget in the sidebar on the staging server and set the display for the last 100 posts, it’s still only showing 55, but it is generating this error in the server error logs, not sure if it’s helpful or not
Just looking at that error text (which isn’t actually an error) and wonder if this applies to you… http://pods.io/2014/03/26/long-query-warnings-pods/
yeah I had talked to wpengine about that, they said it was more of a monitoring thing, but I thought it was interesting that it shows the 55 topic ID’s that keep showing as recent posts, I wasn’t sure if that was helpful or not to have
And moving on – we can see that new post IDs are well into the 40,000+ bracket.
The query that you copied to us a couple of posts back. Were you logged in for that? Or was this as a user? Because those numbers seemed somewhat low considering current post IDs… mind you – the entry had no date so are we sure it was generated today?
logged in as admin, it generates the long query error every time you go to the forum page since I have the display number set so high, I just set up a new test account and logged in a different browser, here is what I got generated when I did that as user and then responded as admin
[Sun Nov 30 15:10:57 2014] [error] LONG QUERY (1066 characters long generated in wp-content/plugins/simple-press/sp-api/sp-api-wpdb.php:176): SELECT rufus_sftopics.forum_id, forum_name, forum_slug, forum_disabled, rufus_sftopics.topic_id, topic_name, topic_slug, topic_icon, topic_icon_new, rufus_sftopics.post_count, ttttttttrufus_sftopics.post_id, post_status, post_index, DATE_SUB(post_date, INTERVAL 5 HOUR) as post_date, ttttttttguest_name, rufus_sfposts.user_id, post_content, display_name FROM rufus_sftopics JOIN rufus_sfforums ON rufus_sfforums.forum_id = rufus_sftopics.forum_id JOIN rufus_sfgroups ON rufus_sfgroups.group_id = rufus_sfforums.group_id JOIN rufus_sfposts ON rufus_sfposts.post_id = rufus_sftopics.post_id LEFT JOIN rufus_sfmembers ON rufus_sfmembers.user_id = rufus_sfposts.user_id WHERE rufus_sftopics.topic_id IN (33279,33267,33278,33275,33161,33271,33254,33273,33269,33280,32646,32965,10305,33277,33276,33264,33225,33274,33272,33270,33268,33263,33265,33266,9532,33262,33261,8876,33232,33244,33258,33260,33241,33259,33250,33249,33239,33226,10133,33236,33246,31762,33251,33253,33257,33256,33255,33190,33243,33252,33248,33234,33247,33220,33229) ORDER BY rufus_sftopics.post_id DESC, referer: /forums/new-member-introduction-1/?new=topic [Sun Nov 30 15:11:19 2014] [error] LONG QUERY (1026 characters long generated in /wp-content/plugins/simple-press/sp-api/sp-api-wpdb.php:176): SELECT rufus_sftopics.forum_id, forum_name, forum_slug, forum_disabled, rufus_sftopics.topic_id, topic_name, topic_slug, topic_icon, topic_icon_new, rufus_sftopics.post_count, ttttttttrufus_sftopics.post_id, post_status, post_index, post_date, ttttttttguest_name, rufus_sfposts.user_id, post_content, display_name FROM rufus_sftopics JOIN rufus_sfforums ON rufus_sfforums.forum_id = rufus_sftopics.forum_id JOIN rufus_sfgroups ON rufus_sfgroups.group_id = rufus_sfforums.group_id JOIN rufus_sfposts ON rufus_sfposts.post_id = rufus_sftopics.post_id LEFT JOIN rufus_sfmembers ON rufus_sfmembers.user_id = rufus_sfposts.user_id WHERE rufus_sftopics.topic_id IN (33279,33267,33278,33275,33161,33271,33254,33273,33269,33280,32646,32965,10305,33277,33276,33264,33225,33274,33272,33270,33268,33263,33265,33266,9532,33262,33261,8876,33232,33244,33258,33260,33241,33259,33250,33249,33239,33226,10133,33236,33246,31762,33251,33253,33257,33256,33255,33190,33243,33252,33248,33234,33247,33220,33229) ORDER BY rufus_sftopics.post_id DESC, [Sun Nov 30 15:11:33 2014] [error] LONG QUERY (1026 characters long generated in /wp-content/plugins/simple-press/sp-api/sp-api-wpdb.php:176): SELECT rufus_sftopics.forum_id, forum_name, forum_slug, forum_disabled, rufus_sftopics.topic_id, topic_name, topic_slug, topic_icon, topic_icon_new, rufus_sftopics.post_count, ttttttttrufus_sftopics.post_id, post_status, post_index, post_date, ttttttttguest_name, rufus_sfposts.user_id, post_content, display_name FROM rufus_sftopics JOIN rufus_sfforums ON rufus_sfforums.forum_id = rufus_sftopics.forum_id JOIN rufus_sfgroups ON rufus_sfgroups.group_id = rufus_sfforums.group_id JOIN rufus_sfposts ON rufus_sfposts.post_id = rufus_sftopics.post_id LEFT JOIN rufus_sfmembers ON rufus_sfmembers.user_id = rufus_sfposts.user_id WHERE rufus_sftopics.topic_id IN (33279,33267,33278,33275,33161,33271,33254,33273,33269,33280,32646,32965,10305,33277,33276,33264,33225,33274,33272,33270,33268,33263,33265,33266,9532,33262,33261,8876,33232,33244,33258,33260,33241,33259,33250,33249,33239,33226,10133,33236,33246,31762,33251,33253,33257,33256,33255,33190,33243,33252,33248,33234,33247,33220,33229) ORDER BY rufus_sftopics.post_id DESC, referer: /forums/ [Sun Nov 30 15:11:47 2014] [error] (1026 characters long generated in /wp-content/plugins/simple-press/sp-api/sp-api-wpdb.php:176): SELECT rufus_sftopics.forum_id, forum_name, forum_slug, forum_disabled, rufus_sftopics.topic_id, topic_name, topic_slug, topic_icon, topic_icon_new, rufus_sftopics.post_count, ttttttttrufus_sftopics.post_id, post_status, post_index, post_date, ttttttttguest_name, rufus_sfposts.user_id, post_content, display_name FROM rufus_sftopics JOIN rufus_sfforums ON rufus_sfforums.forum_id = rufus_sftopics.forum_id JOIN rufus_sfgroups ON rufus_sfgroups.group_id = rufus_sfforums.group_id JOIN rufus_sfposts ON rufus_sfposts.post_id = rufus_sftopics.post_id LEFT JOIN rufus_sfmembers ON rufus_sfmembers.user_id = rufus_sfposts.user_id WHERE rufus_sftopics.topic_id IN (33279,33267,33278,33275,33161,33271,33254,33273,33269,33280,32646,32965,10305,33277,33276,33264,33225,33274,33272,33270,33268,33263,33265,33266,9532,33262,33261,8876,33232,33244,33258,33260,33241,33259,33250,33249,33239,33226,10133,33236,33246,31762,33251,33253,33257,33256,33255,33190,33243,33252,33248,33234,33247,33220,33229) ORDER BY rufus_sftopics.post_id DESC, referer: /forums/new-member-introduction-1/problem-with-post-edit-buttonello-2/ and here is the properties of the first post of test account
| Group ID | 1 | |
| Group Title | General Homesteading | |
| Forum ID | 5863 | |
| Forum Title | New Member Introduction | |
| Forum Slug | new-member-introduction-1 | |
| Topics in Forum | 56 | |
| Topic ID | 33334 | |
| Topic Title | Hello | |
| Topic Slug | hello-2 | |
| Posts in Topic | 2 | |
| Topic Started | 30 Nov ’14 – 10:10 am | |
| First Post ID | 40198 | |
| Last Post ID | 40199 | |
| This Post ID | 40198 | |
| Poster ID | 2417 | |
and the properties of the second post as admin
| Group ID | 1 | |
| Group Title | General Homesteading | |
| Forum ID | 5863 | |
| Forum Title | New Member Introduction | |
| Forum Slug | new-member-introduction-1 | |
| Topics in Forum | 56 | |
| Topic ID | 33334 | |
| Topic Title | Hello | |
| Topic Slug | hello-2 | |
| Posts in Topic | 2 | |
| Topic Started | 30 Nov ’14 – 10:10 am | |
| First Post ID | 40198 | |
| Last Post ID | 40199 | |
| This Post ID | 40199 | |
| Poster ID | 1 | |
and these are the only notices I am seeing in the sp error log on the staging server that looks like they have anything to do with thsi, but these are from a few hours ago
| 30 Nov ’14 12:58 am | spaErrNotice | 2 | php
file: wp-content/sp-resources/forum-plugins/template-tags/library/sp-RecentPosts-widget.php |
| 30 Nov ’14 12:58 am | spaErrNotice | 2 | php
file: wp-content/sp-resources/forum-plugins/template-tags/library/sp-RecentPosts-widget.php |
really not sure why they are recording the long query nonsense. The length of text in a query has nothing to do with it’s quality, performance or integrity. Seems to me to just be unnecessary overhead.
Still moving on…
The interesting thing about these numbers is that the highest topic_id being included appears to be 33279 whereas the new topic you entered there has a topic_id of 33334 – which one would expect to be the first one in the list.
So… in the forum admin > options > global settings – what value do you have in there for the option ‘How many new posts to keep in cache list’ which defaults to 200.
And… are you willing and able to change or remove some data in the database on your staging site?
OK – great.
Table: (your WP table prefix) + sfmeta
Row: where column ‘meta_type’ = ‘topic_cache‘.
We need to erase the data for the column ‘meta_value‘ in that row. The remaining data in the row should stay.
This will force a recreation of the topic cache data (i.e., the most recent 2o0 topics to have a post added).