• Resolved codenameita

    (@codenameita)


    Heya,
    I’m experience a small problem with the freshness display function.
    The topic showed in the freshness is wrong. And when I mean wrong, I mean that the time is correct, but the topic is not.
    This happens only in forums that have a subforum. In case of multiple subforum, the last topic of the last one is showed in the freshness. The link showed in the freshness time is incorrect too, even if the time itself is correct.

    EDIT: not only the topic title and the topic link are wrong, the topic author is wrong, since it’s the author of the topic showed as last active (even if it is not).

    • This topic was modified 8 years, 7 months ago by codenameita.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 24 total)
  • Plugin Author Robin W

    (@robin-w)

    I presume that

    dashboard>settings>bbp style pack>freshness display is acrtivated.

    If so – as a test can you deactivate and let me know if the correct info is now displayed.

    This will tell me if the issue is bbpress or my plugin

    Thread Starter codenameita

    (@codenameita)

    Hey Robin,
    thank you for your prompt reply.

    Actually no, disabling the freshness display inside the plugin does not solve the problem. Topic link and topic author are still wrong. The strange thing is, if I disable the plugin, then the freshness is correct, both topic link and topic author.

    Plugin Author Robin W

    (@robin-w)

    ok, thanks that helps me in looking for where to look.

    what version of bbpress are you using?

    Thread Starter codenameita

    (@codenameita)

    I’m using the last version of WP, with Bbpress version 2.5.14, bbP private groups 3.5.9, bbp User Ranking 2.5 amd bbp topic count 2.0. Bbp style pack is updated at the last available version, too.

    Plugin Author Robin W

    (@robin-w)

    ok, my plugin has a correction to bbpress which clearly is not working for you.

    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. My plugin ignores the parent and works out the correct sub forum, or at least is supposed to, but isn’t in your case !

    can you contact me via my website, as I’ll need to see the issue on your site to work out where I am going wrong

    Thanks

    Thread Starter codenameita

    (@codenameita)

    Actually I have already checked that thing. I was looking at the code of the plugin, when I saw that note and removed all the spam and deleted topics/replies from the forum.

    Indeed, I have a bug on the forum list in the backend section that indicates my hidden forum as also private, closed, spam and so on. I don’t know why, but could that be the reason of the strange behaviour of the plugin?

    EDIT: By the way, maybe I haven’t stressed this enough so I just want to be sure to have correctly conveyed my situation.

    The problem with the freshness is not with the subforum per se. The plugin correctly pick the last active topic/reply among all the subforum of a certain forum. The problem is that it seems to ignore the posts inside the forum.

    For example: if I have a forum called A, which has two subforum called B and C, plus all the posts inside the forum (but outside B and C), the topics inside the forum are completely ignored.

    • This reply was modified 8 years, 7 months ago by codenameita. Reason: Further explanation
    Thread Starter codenameita

    (@codenameita)

    By the way, maybe I haven’t stressed this enough so I just want to be sure to have correctly conveyed my situation.

    The problem with the freshness is not with the subforum per se. The plugin correctly pick the last active topic/reply among all the subforum of a certain forum. The problem is that it seems to ignore the posts inside the forum.

    For example: if I have a forum called A, which has two subforum called B and C, plus all the posts inside the forum (but outside B and C), the topics inside the forum are completely ignored.

    EDIT: sorry for the double post. I could still edit the first one, but I noticed that too late.

    • This reply was modified 8 years, 7 months ago by codenameita.
    Plugin Author Robin W

    (@robin-w)

    ok think I still need to see an example for real so that I can correct – link to an example on your site or contact me via my website if private

    http://www.rewweb.co.uk

    Thread Starter codenameita

    (@codenameita)

    It’s not private, I put it in the topic description.
    You can find the forum here: https://www.starcitizenitalia.com/forum/

    Plugin Author Robin W

    (@robin-w)

    didn’t spot that !

    ok, so can you tell me of an example

    eg look at the x forum and you will see that the freshness is not correct in yy, it should be zz etc.

    Thread Starter codenameita

    (@codenameita)

    Don’t worry.

    Let’s take the forum: “Ambientazione e GDR”.
    (https://www.starcitizenitalia.com/forum/sezione/star-citizen/ambientazione-e-gdr/)
    From the parent forum, “Star Citizen”, it seems that the last active topic is “Lista delle carriere lavorative attualmente note per Star Citizen”, with the last reply dating back to 05/09/2017.
    However, if you go inside the forum “Ambientazione e GDR”, you can see that the last active topic is “Carriere ed Esperienza di vita su Star Citizen”, which is inside the forum, but outside the two subforums “Carriere Lavorative” and “Atlante Galattico”. Furthermore, “Carriere ed Esperienza di vita su Star Citizen” dates back to 05/09/2017, while “Lista delle carriere lavorative attualmente note per Star Citizen”, which is inside “Carriere Lavorative” and it is shown as the last active topic from the parent forum, dates back to 03/01/2016!

    So the date of the last active topic is correct, but it’s assigned to the wrong topic, that by no means it is not the last active one.

    Plugin Author Robin W

    (@robin-w)

    apologies for delay in response – I am away at the moment, so I will get back to you in the next few days

    Plugin Author Robin W

    (@robin-w)

    ok, I’m looking at this now

    can you change some code and test for me?

    if not, come back and let me know

    if you know how to change can you find line 754 in /includes/functions.php

    $mostRecent= 0;
    foreach($show as $date=>$value){
    

    and above this add

    //then add the forum itself incase 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 ;
    			}

    and let me know if this fixes it.

    Thread Starter codenameita

    (@codenameita)

    Thank you for your reply.
    Right now we are moving our server, so I will try your code as soon as possible.

    Thread Starter codenameita

    (@codenameita)

    Hey Robin, I finally had the opportunity to try your code. Unfortunately, it looks like it didn’t work.

    • This reply was modified 8 years, 6 months ago by codenameita. Reason: typo
Viewing 15 replies - 1 through 15 (of 24 total)

The topic ‘Wrong topic displayed in freshness’ is closed to new replies.