+44 0330 223 3428
Call Us
+44 0330 223 3428

WPTavern: BuddyPress Core Contributors Working on a Way to Safely Edit a Group’s Permalink

WPTavern: BuddyPress Core Contributors Working on a Way to Safely Edit a Group’s Permalink

This past weekend while managing a site that runs BuddyPress, I ran into a situation where I needed to change a group’s slug or permalink. Editing the permalink for a post or page in WordPress is easy but BuddyPress doesn’t have the same functionality. As you can see in the screenshot below, an edit button to change a group’s permalink doesn’t exist.

No Way to Edit a Group’s Permalink

Changing the permalink of a post in WordPress automatically creates a redirect so the previous URL doesn’t generate a 404 error. BuddyPress doesn’t offer the same convenience. According to John James Jacoby, BuddyPress lead developer, groups do not have a canonical redirection, or keep track of their slug history.

In my scenario, I had two choices. I could either change the slug and break a number of links or delete the group and recreate it with the slug of my choice. Since the group already has more than 300 members and a handful of posts, I chose the first option.

After a cursory search of Google on how to change a group’s slug, I came across many results that referenced the BP Edit Group Slug plugin created by Jacoby that had not been updated in seven years. As recently as two months ago, a thread on the BuddyPress support forums confirmed that the plugin was broken and generated a lot of errors.

After speaking to Jacoby on Slack and linking him to the forum thread, he graciously spent two hours of his time to update the plugin. I can confirm that it works as advertised with BuddyPress 2.8.1. To change a group’s slug after activation the plugin, visit the Group’s management page on the front-end of the site.

Editing a Group’s Slug

Eight years ago, a ticket was created on BuddyPress trac requesting the ability to change a Group’s slug. The ticket was eventually closed and labeled wontfix by Boone Gorges, BuddyPress lead developer, “Adding it as a core feature is likely to introduce lots of problems, because changed group slugs break all existing links to the content,” Gorges said. “We don’t have a graceful fallback system for changed permalinks, like WP posts do. For now, let’s leave this to a plugin. If we ever overhaul groups to have a different storage mechanism, we can revisit.”

In the BuddyPress Slack channel, David Cavins offered the following idea on how the feature could work, “We could probably add a step after the lookup fails that looks in another place, like group_meta for key = previous_slug and value = slug that missed a group,” he said. Both Gorges and Jacoby approved the idea and encouraged Cavins to work on it for BuddyPress core.

Until the feature is added to core, perhaps a note could be added to the BuddyPress group creation screen for step three that emphasizes how important it is to make sure the permalink is correct.

BuddyPress Group Creation Step Three

I was willing to sacrifice broken links in order to have the correct slug for my Group but it’s a lesson I learned the hard way. I’m hopeful that others don’t make the same mistake and that BuddyPress one day has a graceful fallback system for tracking permalink changes.

Source: WordPress

Related Post
Matt: On React and WordPress

Matt: On React and WordPress Big companies like to bury unpleasant news on Fridays: A few weeks ago, Facebook announced they have decided to dig in on their patent clause addition to the React license, even after Apache had said it’s no longer allowed for Apache.org projects. In their words, removing the patent clause would […]

Read more
WPTavern: First WordCamp Dublin Set for October 14-15

WPTavern: First WordCamp Dublin Set for October 14-15 photo credit: Ireland.com Following up on the success of WordCamp Belfast last October, the WordPress community in Dublin will be hosting its first WordCamp October 14-15. Both camps began the early stages of planning last year and the two communities have shared some of the same organizers […]

Read more
WPTavern: GitHub Partners with Facebook to Release Atom-IDE

WPTavern: GitHub Partners with Facebook to Release Atom-IDE GitHub announced the launch of Atom-IDE this week, a new set of packages that extend its open source JavaScript-powered code editor to include IDE-like functionality. This first release includes packages that support TypeScript, Flow, JavaScript, Java, C#, and PHP. “The start of this journey includes smarter context-aware […]

Read more

Leave a Reply

Your email address will not be published.