Opened 8 years ago

Closed 8 years ago

#1953 closed defect (bug) (fixed)

Profiles: Cyrillic entries from local support forums are limited to just a few words

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Profiles Keywords:


Since #129, profiles include activity from local forums as well.

We've found two issues with the implementation, see an example on

  • Cyrillic entries are cut off to just a few words instead of a meaningful sentence.
  • If the reply starts with someone else's quote, the activity entry displays that quote instead of the actual reply. If the quote is short enough, it's a mix of both, but without any markup to separate them.

For a language where most words are longer than in English, this doesn't make much sense:

Дайте наводку… Выкинуть все…
Не все же на сайте для посетит…
Обьем рубрики должен выйти на…

To get a feeling of what it looks like to a Russian user, here's a translation :)

Give me a hint… Throw away…
Not everything on the site is for visit…
Category size should be…

English entries, on the other hand, are noticeably longer, see the screenshot.

Attachments (1)

meta-1954.PNG (53.6 KB) - added by SergeyBiryukov 8 years ago.

Download all attachments as: .zip

Change History (3)

#1 @SergeyBiryukov
8 years ago

Looking at [3920], reply excerpt should have 55 characters per bbp_get_reply_excerpt( $reply_id, 55 ), but it only has ~27 or so.

  • Perhaps mbstring is not enabled?
  • Any chance to use wp_trim_words() to cut by words instead of characters?
  • If wp_trim_words() cannot be used, any chance to increase the length to at least 80 characters?
Last edited 8 years ago by SergeyBiryukov (previous) (diff)

#2 @coffee2code
8 years ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 3931:

Profiles Activity Notifier: Improve reply excerpt generation.

  • Use newly introduced get_reply_excerpt() instead of bbp_get_reply_excerpt().
  • Strip all blockquoted text from excerpts since that text is not original to the reply.
  • Trim reply excerpts by words (15) instead of by characters.
  • Add trim_text() to handle trimming text by words or by characters.
  • If trimming by characters, honor requested excerpt length for multibyte strings.

Fixes #1953.

Note: See TracTickets for help on using tickets.