Support Forum
Hey there,
Got a strange quirk going on. I set SP's profile mode set to link forum profiles to Buddypress profiles. The links that SP is generating that should go to a user's profile include their username in the URL as opposed to the users' user_nicename value, which is what BuddyPress uses. This results in every profile link on my site being broken. Do I have something configured wrong here?
is this some setting in bp somewhere? or forced differently by a bp plugin? or a recent change?
we seem to conflicting reports from users on what bp uses there... in the past, we used user_nicename but had a bunch of users say it broke it... so we changed it and it got them working... now a report of the opposite...
so just confused on this one...
Visit Cruise Talk Central and Mr Papa's World
Yeah, I can understand this being a hard one to track and replicate, so I'll give you a bit more background.
I was working on redesigning an existing site, which wasn't previously using SimplePress. This meant setting up the site on a test server to build it before making it live. It is a members site (also using WLM), and we wanted to further separate what the public sees and what the members site is, so what was the test site would actually become the permanent home for the site. Which means instead of moving the site from the test site to the live site once we finished, it was the opposite - a final import of database info from the live site to the test site so that it was up to date (before, obviously, redirecting login forms to go to the new members site).
Somewhere in that process is where things changed, and I feel like had the order been different, this might not have occurred. What had to be moved over was the newer user tables, then the forum info (previously bbPress), then importing that forum data into a new SP install. The wildcard is that somewhere in that process - my guess is after the forum import - I triggered another process that altered all of the users' user_nicename values. The first time we had moved data over from the live site to the members dev site was the initial import needed to start working on it - and in that process, I believe the nicename-changing process happened before the SP import. I could be mistaken though.
As far as changes that might give you a clue, that's all that comes to mind. That said, the development of the site was about 4 months, and the change may have happened on your end. Where the nicename profile link was working for us before, we likely upgraded SP builds and the new system broke our profile links.
I'm guessing SimplePress builds its own list of BuddyPress profile links and doesn't actually sync them up with BP. Is there any way to rebuild that list?
well, its not really a list... its hardcoded to use the user login value from the wp users table...
however, a while back someone had changed it similarly so we added a filter to the link so that you can change it yourself...
just hook into our hook 'sph_buddypress_profile' and you can return the url that you want... you will get two arguments to the filter when you use it... first is the url and second is the user object.. so you can rebuild the url to use the nicename instead...
Visit Cruise Talk Central and Mr Papa's World
add_filter('sph_buddypress_profile', 'my_url_routine', 10, 2)
function my_url_routine($site, $user) {
$site = xxxxx;
}
and return the url you want for the page instead of xxxxx... if you need to construct the url, the user object is passed to the routine and available in the $user variable...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)