Skip to:
Content

Opened 3 years ago

Closed 20 months ago

Last modified 4 months ago

#4367 closed defect (bug) (fixed)

Changing WordPress permalinks breaks old BuddyPress activity updates links

Reported by: dvd3141 Owned by: r-a-y
Milestone: 1.9 Priority: normal
Severity: normal Version: 1.0
Component: API - Rewrite Rules Keywords: needs-patch dev-feedback
Cc:

Description

If I change the permalinks setting in WordPress Settings / Permalinks, then all previous BuddyPress activity updates become broken. For example, "Joe Bloggs wrote a new post 'New Post'" — the link to New Post still uses the old permalinks structure, and results in a 404 error.

Attachments (1)

4367.01.patch (881 bytes) - added by r-a-y 2 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 @DJPaul3 years ago

  • Component changed from Core to Activity
  • Milestone changed from Awaiting Review to Future Release
  • Severity changed from major to normal
  • Version changed from 1.5.6 to 1.0

We could think about making Blog + Page permalinks take the ?p=… URL format as those are redirected to the "real" URL.

comment:2 @r-a-y3 years ago

We could think about making Blog + Page permalinks take the ?p=… URL format as those are redirected to the "real" URL.

I love this idea! :)

@r-a-y2 years ago

comment:3 follow-up: @r-a-y2 years ago

  • Component changed from Activity to Blogs
  • Keywords has-patch early added
  • Milestone changed from Future Release to 1.8

Attached a patch; will commit this in 1.8.

comment:4 @boonebgorges2 years ago

  • Keywords commit added

comment:6 @boonebgorges2 years ago

  • Component changed from Blogs to Rewrite Rules
  • Keywords has-patch early commit removed
  • Milestone changed from 1.8 to 1.9

comment:7 @inetbizo21 months ago

I deleted all sample posts and the activity STILL shows the posts in user activity stream!

comment:8 @r-a-y20 months ago

inetbizo: Please create a new ticket for your issue as your problem does not appear to be related to this ticket.

comment:9 @r-a-y20 months ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 7447:

Blogs: Modify recorded post permalink to use shortlink.

Previously, when BuddyPress recorded the post permalink in the
activity stream, it would use the current permalink structure of the blog.

The problem with this is if the blog changed its permalink structure,
the post permalink in the activity post would not resolve properly
because of the change.

This commit alters the recorded post permalink to use the shortlink
(domain/?p=POST_ID). Because WP's rewrite rules will pick up the
'p' query parameter and redirect to the proper post permalink, this
will ensure that the post permalink for future activity blog posts
will work as intended.

Fixes #4367.

comment:10 in reply to: ↑ 3 @allspark10 months ago

Replying to r-a-y:

Attached a patch; will commit this in 1.8.

Re #7367 "Changing WordPress permalinks breaks old BuddyPress activity updates links" where do you paste the patch? New to BuddyPress and any detailed directions/guidance would be appreciated. Many thanks,
Robert

comment:11 @crakotte6 months ago

  • Keywords needs-patch dev-feedback added

Using shortlinks for posts in the activity stream is not a good idea... That caused websites SEO problems! Because of that, posts indexed in Google may be with shortlinks instead of choosen permalink structure (redirections aren't enought to avoid that problem)...
Users who choose to change their URLs should make redirections or change links. BuddyPress shouldn't solve users' errors...

Last edited 4 months ago by crakotte (previous) (diff)
Note: See TracTickets for help on using tickets.