Skip to:
Content
Pages
Categories
Search
Top
Bottom

Freshness Time Incorrect


  • BlueDagger4Ever
    Member

    @bluedagger4ever

    We just recently switched over to bbPress, but seem to have one nagging bug I can solve. On our topic freshness the time is incorrect and is showing several hours even when a post was made just a few seconds ago. I double checked the wordpress setup for time, but that is set correctly. Any assistance would be greatly appreciated.

    Here is a screenshot of a brand new post showing a freshness of 7 hours (which I’m guess is due to us being GMT -7 for Denver, CO.

    http://img.photobucket.com/albums/v474/BlueDagger/Admin%20stuff/TimeError.png

Viewing 22 replies - 1 through 22 (of 22 total)

  • Steve
    Participant

    @steveatty

    If you force a re-count then it basically messes everything up…

    Same issue here. BBPress forum working great for five weeks. Just recently at the forum homepage, Topics and Replies seem to appear in correct order but the Freshness score is all wrong. Any suggestions on how to reset this? Thanks.


    Shane Gowland
    Participant

    @thewebatom

    Are you using any caching plugins? I accidentally forgot to ignore my forum pages once and it caused this exact problem.

    Thanks for the suggestion but no, I’m not using any caching plugins. This problem just started recently. Could this have anything to do with time zone settings within WP or time zones where the users are posting from?

    Short of fixing this, wonder if there’s an easy way to suppress the Freshness column?

    Followup: now the Freshness indications seem to be correct for the list with the exception of the most recent Topic or Reply… you post a reply right now and it appears first in the list but is characterized as 8 hours old in Freshness… the next and sequential topics are accurately rated in Freshness, such as 3 hours, 5 hours, 1 day, etc.

    Any suggestion on how to fix this? Thanks!


    baldg0at
    Participant

    @baldg0at

    Just migrated from standalone to plugin a couple weeks ago and this one has me stumped. I’m having issues where the freshness time doesn’t match up with the latest reply time.

    http://ragbrai.com/forums

    WP v3.3.1

    BBPress v2.0.2

    From what I can see the freshness time is based on the topic’s ‘_bbp_last_active_time’ meta tag.

    On my forums, using the ‘Route Announcement Party ā€“ Who’s In?’ as an example, you can see the freshness date is way off when you compared to the time of the latest reply.

    Currently the ‘_bbp_last_active_time’ meta_key has a value of ‘2012-03-08 08:51:03’

    From what I can tell that meta_key is set based on the post_date of the topic or the post_date of the latest reply of the topic with a status of publish, right?

    The latest published reply for that topic has a post_date of ‘2012-01-26 08:13:57’

    The only post in the database with a post_date of ‘2012-03-08 08:51:03’ is a reply to a different topic and it has a status of ‘spam’

    Maybe something went wonky with the import from stand alone.

    Is anyone else seeing anything like this?


    baldg0at
    Participant

    @baldg0at

    More on this…

    It appears that replies that get marked as spam by Akismet are updating the topic freshness.

    Anyone else seeing this?


    Jared Atchison
    Member

    @jaredatch

    Hmm, the only time I’ve ever really seen this issue is on imports from 1.x, though unfortunately I don’t have an answer on why it’s jacking up.

    If you are on a development site, just for grin I’d try out 2.1 (currently in development) to see if that happens to iron out some of these weird issues.


    NickMackz
    Participant

    @nickmackz

    I’ve got the same issue on my forums which haven’t been imported from 1.x. They were however moved from a different domain to the current one along with the entire site and database.

    New posts on mine appear as 2 hours old immediately.

    Everything looks fine in the database – post time and meta last active time are correct and the same.


    NickMackz
    Participant

    @nickmackz

    Tried it in 2.1. Still showing new posts as 2 hours freshness.


    NickMackz
    Participant

    @nickmackz

    Just discovered that All-in-One Event Calendar plugin was causing this. Now I need to find an alternative.


    baldg0at
    Participant

    @baldg0at

    @jaredatch

    Unfortunately, the site is in a production environment. I’d be nervous about using 2.1 before it’s ready.

    Here’s another site I use bbpress on — http://hawkcentral.com/forums/

    Right now, the “Week 5 picks” and “Thoughts From Week 2 in College Football” topics show a freshness of 19 hours and 20 hours respectively. The users showing on the home page are obviously spam users (that I’ve since been blocked) and their posts have already been marked as spam by Akismet.

    I’ve dug into the code and I can see where the last active time is getting updated. I’m going to put some logging code in and see if I can discover what’s happening.

    I’ll report back.


    baldg0at
    Participant

    @baldg0at

    I did do some logging, but didn’t see anything unusual.

    However, now the SPAM posts that were apparently caught by akismet and triggering the freshness date update but not appearing on the site are now appearing on the site… or so it seems.

    I may have interpreted what was happening incorrectly.

    Anyway, I’m no longer seeing this issue.


    Timo Reith
    Participant

    @worschtebrot

    Same issue for me. You can see it at http://www.wp-amazon-plugin.com/forums/ in the German forums. My last reply was about 30 minutes ago, but on the main forums list it says more than 2 weeks ago. That does not really create a good impression for a new visitor.

    As someone mentioned above, the repair function (Tools / Forums) makes it even worse and is not working.

    I found a lot of other resources on the web about this issue. It still seems to be unfixed after all those years…


    Mal
    Participant

    @looimaster

    Still not fixed as of October 2018.


    Robin W
    Moderator

    @robin-w

    Try this – or much easier just add my style pack plugin to your site which has this fix built in, and let me know if it fixes

    bbp style pack

    //filter to correctly return last active ID for sub forums
    //note : a parent forum or category can get the wrong last active ID if a topic in a sub forum is marked as spam or deleted. This filter ignores the parent and works out the correct sub forum
    
    //don't add if pg filter exists as this will have done it already
    if (!function_exists ('private_groups_get_permitted_subforums')) {
    	add_filter ('bbp_get_forum_last_active_id' , 'rew_get_forum_last_active_id', 10 , 2 ) ;
    }
    
    function rew_get_forum_last_active_id ($active_id, $forum_id) {
    	$sub_forums = bbp_forum_get_subforums($forum_id) ;
    	if ( !empty( $sub_forums ) ) {
    		$active_id = 0;
    		$show = array();
    		//find the latest permissible 
    		foreach ( $sub_forums as $sub_forum ) {
    			$sub_forum_id =  $sub_forum->ID ;
    			$active_id = get_post_meta( $sub_forum_id , '_bbp_last_active_id', true );
    			$last_active = get_post_meta( $sub_forum_id, '_bbp_last_active_time', true );
    			if ( empty( $active_id ) ) { // not replies, maybe topics ?
    				$active_id = bbp_get_forum_last_topic_id( $sub_forum_id );
    				if ( !empty( $active_id ) ) {
    					$last_active = bbp_get_topic_last_active_time( $active_id );
    				}
    			}
    			if ( !empty( $active_id ) ) {
    				$curdate = strtotime($last_active);
    				$show[$curdate] = $active_id ;
    			}
    		}
    		//then add the forum itself in case it has the latest
    			$active_id = get_post_meta( $forum_id , '_bbp_last_active_id', true );
    			$last_active = get_post_meta( $sub_forum_id, '_bbp_last_active_time', true );
    			if ( empty( $active_id ) ) { // not replies, maybe topics ?
    				$active_id = bbp_get_forum_last_topic_id( $forum_id );
    				if ( !empty( $active_id ) ) {
    					$last_active = bbp_get_topic_last_active_time( $active_id );
    				}
    			}
    			if ( !empty( $active_id ) ) {
    				$curdate = strtotime($last_active);
    				$show[$curdate] = $active_id ;
    			}
    		$mostRecent= 0;
    		foreach($show as $date=>$value){
    			if ($date > $mostRecent) {
    				 $mostRecent = $date;
    			}
    		}
    		if ($mostRecent != 0) {
    			$active_id = $show[$mostRecent] ;
    		} else {
    			$active_id = 0;
    		}
    	}
    	return apply_filters( 'rew_get_forum_last_active_id', $active_id, $forum_id );
    }

    Mal
    Participant

    @looimaster

    Wow, thank you for your quick reply, I didn’t expect that there will be one šŸ™‚

    I’m using v2.6 RC-6 and this doesn’t update the freshness. v2.6 has the same bug sadly.

    And when I go to Tools > Forums and run all “Recalculate…” tasks then ['bbp-forum-index'] shortcode loses sub-forums display on my front page of website. To fix this I have to go to “Forums” and open every parent forum and click “Publish” again.


    Robin W
    Moderator

    @robin-w

    sorry, I have enough trouble Keeping up with 2.5.14 to look at 2.6 until it comes out !


    liyacaty
    Participant

    @liyacaty

    Are you using any caching plugins? I accidentally forgot to ignore my forum pages once and it caused this exact problem.


    Mal
    Participant

    @looimaster

    @robin-w
    What’s the problem? Are you hired here to provide support?

    – You can create a GitHub repository and all issues will be nicely organized. You can have priority and severity labels. You will be efficient by focusing on what’s actually important.
    – Maybe implement voting and the community will decide what is important to fix and what isn’t. For example what I report is rather “high priority” to fix as this is a front page visual bug.
    – Bugs could be quickly identified and eliminated.
    – “Random support requests” are chaos and not important to answer (unless they get enough votes from community).

    Problem solved?

    @liyacaty
    No, I’m not using any caching plugins.

    I think these “Recount” actions in Tools > Forums are breaking things. Are they even necessary? If some could be eliminated and done automatically that would be great.


    Robin W
    Moderator

    @robin-w

    @looimaster I’m just a bbpress user trying to put something back on the open software community

    bbpress has https://bbpress.trac.wordpress.org/ as it’s code improvement tool


    liyacaty
    Participant

    @liyacaty

    Thanks for the suggestion but no, Iā€™m not using any caching plugins. This problem just started recently. Could this have anything to do with time zone settings within WP or time zones where the users are posting from?

Viewing 22 replies - 1 through 22 (of 22 total)
  • You must be logged in to reply to this topic.
Skip to toolbar