Page Links Broken


#1

So I have rt media running with buddypress and everything was going great. Till I changed my “Members” page from mysite.com/members-2 to mysite.com/members. Now no media will show up and the media tabs under groups and show the “Permission Denied Not Found / No Access The page you are looking for either does not exist, or you do not have the permissions to access it.” It seems that I have broken the links. How should I rebuild them?


#2

Hello @communityofculture,

Please once check it by activating WordPress default theme and also by disabling other plugins on your site.

Let us know if the issue still exist.

Thank you.


#3

Hello @communityofculture,

Let us know if your issue still exist or it has been solved.

Thank you.


#4

Will be with you shortly.


#5

Ok. So I did as told and nothing changed. It doesn’t seem to be another plugin or the theme. When I click media it links to .com/members-2 instead of the appropriate .com/members that I changed it to. I figure its really not good to change your links to far in but I am just building and testing so I wanted to do it now. I could erase all the other media that was on before and start fresh except uploads are linking to the right place since they aren’t showing up at all from the activity feed. And I can’t get into the media link on the buddypress menu to upload there either.


#6

Check your Pages trash section. You probably have a page with that slug in the trash right now. Empty your trash and you should get the slug to reset to /members/ by editing that page again.


#7

Hello @communityofculture,

You will face problem with activity feed because BuddyPress stored activity content in database and those are the static content. So, when you traverse activity page it will find in old member’s link stored before and not in new.

As an alternative, you can apply rewrite rules to redirect on new page slug whenever there is any call to old page slug.

One more sloution is to use ‘bp_activity_prefetch_object_data’ filter and replace members-2 with members inside activity content.

We hope it helps you.

Thank you.


#8

Thanks! I had already deleted the page and had no pages in my trash but when I updated the page by typing in testing in content box and then erased it and updated again. Magically it started working! What is really weird is that .com/members/testname worked fine. It was when you hit the media link did it give you the error can not find page or you do not have permission. I also changed the permalink structure for posts and changed it back. Do you think the links just needed to update themselves and I helped my refreshing some stuff? Trying to learn. Thanks.


#9

Thanks. So. I didn’t need to any of this thankfullly. I was kind of at a lost to do it but I am sure I could learned. And I couldn’t find anywhere in my buddypress plugin folder that “members-2” was written. I reloaded the page after updating the “members” page with a line of text and then updated the permalink structure and then changed those two back. Wam bam it worked. I don’t know what worked but it did. Where exactly would I have replaced members-2 with members. Just so I understand what happened here and maybe I can fix my own problems in the future. Thanks. lol


#10

When you edit a page or a post – directly under the title – you will see the slug to edit.


#11

Hello @communityofculture,

You will not find it in plugin’s ( BuddyPress ) folder, It will be stored in database. We are also not sure how it worked. It should not work unless you edit the page slug !

This is BuddyPress filter -> ‘bp_activity_prefetch_object_data’ . You can use this filter in your theme’s function.php and modify its activity content by replacing old-page slug to it’s new page slug.

Thank you.


#12

First I deleted all my pages in the trash. Then I changed the slug from “members-2” to “members”. And it stopped working. All media was still linking to .com/members-2. Then after doing above everything starting linking to .com/members and like magic all media started working. I uploaded a photo. Checked all the links. Commented on a photo and everything was working great. A few hours later I came back to the site and media was not working again. [23-Dec-2014 04:06:19 UTC] PHP Warning: Missing argument 2 for bp_modify_page_title() in /home3/wop1234/public_html/home/wp-content/plugins/buddypress/bp-core/bp-core-filters.php on line 426 [23-Dec-2014 04:06:19 UTC] PHP Warning: Missing argument 3 for bp_modify_page_title() in /home3/wop1234/public_html/home/wp-content/plugins/buddypress/bp-core/bp-core-filters.php on line 426 This is the error in my error log. And I am sorry pranalipatel but I don’t understand how to do that. But is it necessary now that the page link looks correct.


#13

Sorry. I copied the wrong error. This is the correct error. ` [19-Feb-2015 18:55:50 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 10 for query SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_author_email, comment_date_gmt, comment_approved, comment_type,comment_author_url, SUBSTRING(comment_content,1,80) AS com_excerpt, user_id FROM wp_comments LEFT OUTER JOIN wp_posts ON (wp_comments.comment_post_ID = wp_posts.ID) WHERE comment_approved = ‘1’ AND comment_type = ‘’ AND post_password = ‘’ ORDER BY comment_date_gmt DESC LIMIT made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(’/themes/bp-corporate/community.php’), get_sidebar, locate_template, load_template, require_once(’/themes/bp-corporate/sidebar.php’), locate_template, load_template, require_once(’/themes/bp-corporate/lib/templates/bp-template/optionsbar.php’), dynamic_sidebar, call_user_func_array, WP_Widget->display_callback, My_WPMUDEV_Recent_Comments_Widget->widget

` But I again edited the page by typing in some text updated the page and then erased it and updated it again. I then updated the permalink structure again and once again the media is working just fine. I’ll let you know if it stops working again. Once again thank you for the help.


#14