Skip to:
Content

Opened 4 years ago

Closed 3 years ago

#2349 closed defect (bug) (fixed)

Activity Permalinks (#) on activity page are broken for long post titles

Reported by: 3sixty Owned by:
Milestone: 1.5 Priority: normal
Severity: Version:
Component: Activity Keywords: has-patch
Cc:

Description

This URL looks ridiculous but illustrates 2 points:

http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/this-is-just-a-test-post-to-determine-if-the-awesome-new-activity-permalinks-are-broken-by-long-topic-titles-that-is-my-hypothesis-and-if-the-permalinks-are-broken-on-this-one-then-i-shall-file-a-t/?_wpnonce=ccf70f9033#post-50794

  1. For the new activity permalinks on the activity page of buddypress.org/community, there is a truncation problem that is causing the URL to break and point to the first record in the _bb table
  2. Larger issue: Malformed/nonexistent slugs SHOULD trigger a 404 error, but instead, they point to the first record in the _bb table

See the ridiculous URL for more details...
Thanks!

Attachments (1)

2349-1.patch (526 bytes) - added by boonebgorges 3 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 3sixty4 years ago

  • Milestone changed from 1.2.4 to 1.3

comment:2 boonebgorges3 years ago

The problem is this. By default, bbPress limits slug length to 255 characters. But the primary_link column in the BP activity table is set to varchar(150). So in most cases (by the time you subtract the length of the domain, etc) you might be left with a max of 100 of those characters being stored in primary_link.

I think the answer is to bump the maximum size of primary_link. See 2349-1.patch. I increased it to 300, but even that might not be enough for long domain names, etc. Anyone have a sense of the best way to handle it?

comment:3 boonebgorges3 years ago

  • Component changed from Core to Activity

boonebgorges3 years ago

comment:4 cnorris233 years ago

  • Keywords has-patch added

comment:5 DJPaul3 years ago

Suggest we punt and review after bbPress plugin release/integration.

comment:6 boonebgorges3 years ago

  • Milestone changed from 1.3 to 1.4

Agreed.

comment:7 dwenaus3 years ago

my suggestion: don't fix the underlying problem, but for versino 1.3 just put on a bigger bandage that requires no testing: Set the varchar be 255 in length. Later in version 1.4 address the issue properly by reducing the slug length of bbpress, or extending beyond 255.

FYI, this is affecting the buddypress.org website as well. It's my second time in two days I've hit this. :)

comment:8 DJPaul3 years ago

  • Milestone changed from 1.4 to 1.3

comment:9 djpaul3 years ago

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

(In [4124]) Correctly handle invalid forum permalinks. Also fixes a couple of PHP notices. Fixes #2349.

Note: See TracTickets for help on using tickets.