Site logo

Archived topic

Read more string appended to bbPress Topics and Replies

18 replies · Started by Jessica on March 18, 2021

Viewing posts 1–15 of 19

We have just recently started using GP and I have noticed a problem in the Dashboard area, it doesn't seem to be a problem on the front end of site. I have updated all themes and plugins, and have isolated a problem that I think might be a conflict between bbPress and GeneratePress. The problem behavior is corrected when TwentyTwenty theme is activated.

In the Dashboard area, bbPress shows Replies and Topics separately on edit.php?post_type=reply and edit.php?post_type=topic

On many of the replies and topics, not all, there seems to be a Read More link appended at the end of each excerpt. (Extended View must be selected on Screen Options). When editing the topic or reply, there is no evidence of a read more tag so I am not sure where it is coming from.

This is a screenshot of the Replies section, the behavior is the same on random Topics: https://prnt.sc/10peujq

Hi Jessica,

I could be wrong but can't see how this would be a theme issue - especially it doesn't happen on every reply.

Does the issue still exist with all plugins and custom functions disabled and the parent theme activated (if you are using a child theme)?

Let me know :)

Thanks for the quick reply! I am using a Child Theme. I started troubshooting by rolling back to Parent Theme only, problem still persists. I then deactivated bbPress related plugins one by one, problem still persists. I deactivated our own plugin with random customizations and the problem still persists. I switched to TwentyTwenty theme, problem corrected.

Any thoughts? Maybe I am just overlooking something here.

Any chance you can deactivate all plugins except bbPress and provide the dashboard access?

I'll ask Tom to take a look.

Please create a staging site for it if it's a live site with traffic.

We are using bbPress for this forum as well and I can't recall other mentions of this issue.

Sure thing. I am testing in our staging enviroment. I thought surely it's something I broke and not a conflict, but I can't figure it out. lol.

I deactivated all plugins except bbPress and Temporary Login tool. I will provide the temp admin login credentials and staging address.

oops, and I guess all plugins weren't updated. But we have eliminated that from the equation by disabling.

Oh no, sorry that was misleading and I was just clarifying. It is still not fixed.

Did you see my screenshot above?

The issue isn't showing up for me.

The problem is still there. You need to select Screen Options, then Extended View.

Ahh ok I see. Forwarded to Tom :)

Weird, never used extended view like that.

You could try adding a function like this:

add_filter( 'excerpt_more', function( $more ) {
    $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;

    if ( $screen ) {
        if ( 'edit-reply' === $screen->id || 'edit-topic' === $screen->id ) {
            return '';
        }
    }

    return $more;
}, 999 );

Adding PHP: https://docs.generatepress.com/article/adding-php/

Let me know :)

That fixes the problem on Replies. Still a problem on Topics. Is this a bandaid or is there a reason for it happening on some entries and not others?

I just updated the function to include topics.

I wouldn't say it's a bandaid - it's a solution. They're using the_excerpt() function to grab that excerpt, and that function will also display the read more text if applicable. The above function simply tells it not to. Honestly, it's probably something that should exist in bbPress by default.

Thanks for updating that! It works. I appreciate your time!

Because I am a sucker for understanding why something is happening, I guess I am wondering when the read more text comes into play. I don't see the source of where that is being triggered. I ask because we have been using bbPress for 10 years and have never seen it. I don't think our users are doing anything different.

This archived topic is closed to new replies.