Skip to:
Content

BuddyPress.org

Opened 7 years ago

Closed 4 years ago

#5981 closed enhancement (maybelater)

Activity excerpts show read more link only if excerpt length changed

Reported by: hnla Owned by:
Milestone: Priority: normal
Severity: minor Version:
Component: Activity Keywords: needs-patch, reporter-feedback, trac-tidy-2018
Cc: hugoashmore@…

Description

This is feeling a little confusing, leads on from a forum post where the poster wants to show a read more link for all activity entries.

We show a default set of ellipses unlinked appended to the $text/$excerpt and only link through on the activity meta.

If we force a change to the excerpt length via the filter 'bp_activity_excerpt_length' in bp_activity_truncate_entry() - bp-activity-filters.php we then have returned a read more link appended after the ellipses.

We do state if original $text doesn't match the return from bp_create_excerpt() then append the read more link. A post appears to be able to have well over the default 358 characters, is shown as truncated so in theory we should have a case where the original $text != $excerpt so should be running the read more link.

What feels confusing is are these in a sense not already excerpts, yes a simple updated avatar entry isn't but a post is and where it is clearly truncated thus $excerpt different from $text we only add ellipses until a new excerpt length is filtered in whereupon we get a read more link.

I'm struggling to pin this down but something feels wrong as though we are double truncating, not physically but in a logic sense.

Change History (7)

#1 @hnla
7 years ago

  • Cc hugoashmore@… added
  • Keywords 2nd-opinion added

Updating this as the majority of the initial post is false, based on other factors colouring my results.

I'm leaving open the question though that the original reason for looking at this aspect of activity truncation was as a user asked on the forum why their posts were appearing without read more links only unlinked [...] BP is not at fault it's a filter running on WP posts or the standard wp excerpt creation.

I wonder though as it's clear from dumping out $text in bp_activity_truncate_entry() that we receive post content after WP has filtered and truncated whether it might be better to grab the post content before in raw state so that BP can run it's function fully rather than returning out of bp_create_excerpt with $text unmodified?

#2 @hnla
7 years ago

  • Type changed from defect (bug) to enhancement

#3 follow-up: @DJPaul
7 years ago

  • Keywords reporter-feedback added

Are you saying there's a bug where, after WP truncates a Post, we take that truncated text and then add that into the Activity stream, instead of taking the original post content, and running our own truncation methods on it?

#4 in reply to: ↑ 3 @hnla
7 years ago

  • Keywords reporter-feedback removed

Replying to DJPaul:

Are you saying there's a bug where, after WP truncates a Post, we take that truncated text and then add that into the Activity stream, instead of taking the original post content, and running our own truncation methods on it?

No not a bug, but as we take the post content after WP has run it's filters we then don't run our function fully, iirc we should in theory be rendering a link rather than WP's [...] the first post attempts to describe our function actions, it just felt odd that if I adjusted the excerpt length via BP filter then the already truncated WP content was returned from BP create excerpt and had a read more link appended - this is not a good description and I'm not being very clear :) something isn't logically quite correct but it's not necessarily a bug. As this isn't something any one else has raised apart from that one forum post it should be set to close, unless I can really sit down and examine in detail.

#5 @DJPaul
7 years ago

  • Keywords needs-patch reporter-feedback added; 2nd-opinion removed
  • Milestone changed from Awaiting Review to Future Release

Moving to FR milestone for review. I think you're right, but the ticket is still hard to understand and the problem needs to be clarified a bit. :)

#6 @DJPaul
4 years ago

  • Keywords trac-tidy-2018 added

We're closing this ticket because it has not received any contribution or comments for at least two years. We have decided that it is better to close tickets that are good ideas, which have not gotten (or are unlikely to get) contributions, rather than keep things open indefinitely. This will help us share a more realistic roadmap for BuddyPress with you.

Everyone very much appreciates the time and effort that you spent sharing your idea with us. On behalf of the entire BuddyPress team, thank you.

If you feel strongly that this enhancement should still be added to BuddyPress, and you are able to contribute effort towards it, we encourage you to re-open the ticket, or start a discussion about it in our Slack channel. Please consider that time has proven that good ideas without contributions do not get built.

For more information, see https://bpdevel.wordpress.com/2018/01/21/our-awaiting-contributions-milestone-contains/
or find us on Slack, in the #buddypress channel: https://make.wordpress.org/chat/

#7 @DJPaul
4 years ago

  • Milestone Awaiting Contributions deleted
  • Resolution set to maybelater
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.