Search Results for 'buddypress'
-
Search Results
-
I’m marking this as ‘not resolved’ because I’m sure there is a better way to do this…and I’m simply astounded that so many people are having issues with this same installation pattern within different environments. It’s really obnoxious.
With that said, I got my setup working using the instructions found here: http://theeasybutton.com/blog/2009/04/30/integrating-buddypress-10-wpmu-and-bbpress/ and downloading the Alpha 6 version of BBPress from the same site, since it’s not available (at least I couldn’t find it) on the BBPress site since their new release of RC-1.
Now, after following these instructions, and I’ve installed several of these again from scratch to make sure I did everything correctly…I was having backslashes appear in my BBPress forum. They were showing up in different cases, here’s a break down:
These cases below are specific to the Topic Name, not the actual content within the post.
- Creating a new topic in BBPress would result in NO slashes appearing on the charcters ‘ ” and (meaning it worked perfectly). On the BuddyPress groups side of things it also rendered correctly. I checked the database and the records contained no slashes as well.
- Creating a new topic on the BuddyPress side (in groups -> forums) showed perfectly on the BuddyPress side. However, on the BBPress side I would see for the following topic title:
"Testing" 'single-quotes' / and stuff!BuddyPress: "Testing" 'single-quotes' / \ and stuff!BBPress: \\\"Testing\\\" \\\'single-quotes\\\' / \\\ and stuff!
This was a huge annoyance. I managed to band-aid it with the help of Chris at the Easy Button site I referenced above. You can scroll down and see the back-and-forth in the comments (I’m Jason).
Here’s the fix, and it’s ugly and definitely not the best solution, as it now strips out characters entirely, even ones I’ve intentionally typed in. Go to the directory that contains BBPress->bb-includes->defaults.bb-filters.php
In this file I first changed this chunk of code:
<br />
// Strip, trim, kses, special chars for string saves<br />
$filters = array( 'pre_term_name', 'bb_pre_forum_name', 'pre_topic_title' );<br />
foreach ( $filters as $filter ) {<br />
add_filter( $filter, 'strip_tags' );<br />
add_filter( $filter, 'trim' );<br />
add_filter( $filter, 'bb_filter_kses' );<br />
add_filter( $filter, 'wp_specialchars', 30 );<br />
}<br />to
<br />
$filters = array( 'pre_term_name', 'bb_pre_forum_name', 'pre_topic_title' );<br />
foreach ( $filters as $filter ) {<br />
add_filter( $filter, 'strip_tags' );<br />
add_filter( $filter, 'trim' );<br />
add_filter( $filter, 'bb_filter_kses' );<br />
add_filter( $filter, 'wp_specialchars', 30 );<br />
add_filter( $filter, 'stripslashes' ); // <-- this is the new line I added<br />
}<br />This strips out the slashes for me down to one. So in the above topic title, on the BBPress side, I would now see:
\"Testing\" \'single-quotes\' / \ and stuff!At this point I was pretty much like WTF…but then I poked around a bit more within the same file and changed this chunk of code:
<br />
// Format Strings for Display<br />
$filters = array( 'get_forum_name', 'topic_title', 'bb_title', 'bb_option_name' );<br />
foreach ( $filters as $filter ) {<br />
add_filter( $filter, 'wp_specialchars' );<br />
}<br />to
<br />
// Format Strings for Display<br />
$filters = array( 'get_forum_name', 'topic_title', 'bb_title', 'bb_option_name' );<br />
foreach ( $filters as $filter ) {<br />
add_filter( $filter, 'wp_specialchars' );<br />
add_filter( $filter, 'stripslashes' ); // <-- this is the new line I added<br />
}<br />I haven’t tested this very deeply but so far it seems to fix my problem, it removed all the slahses…including any I type in purposefully. What worries me is that Chris was only seeing a single slash and just the first chunk of code fixed it for her. We followed the exact same steps for installing.
Here’s some more info in case it’s needed about my PHP / MySQL set up:
I’m using MAMP on Mac OS X. I have it set up to work with my local host, which I reference not by ‘localhost’ but by an IP address. E.G.: http://192.168.1.1/my-site-name
MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation: utf8_unicode_ci
PHP Version 5.2.6
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
I am using WordPress MU 2.7.1 and BuddyPress 1.0 and all over my error log is:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.So i traced the error to my access log and I found that these errors are being caused by some site requesting a file that no longer exists. Which should create 404 (not found) error, but instead it is redirecting the site to look somewhere else and then that place is telling it to look in the first place, causing an internal redirect which only stops once it reaches the maximum of 10 internal redirects. At this point it puts out a 500 internal error and when there are enough of them tends to hang my PHP and give me whitescreens on any page that isn’t cached. Only rebooting php and my server solves the problem until google or someone else searches for a file on my site that isn’t there, and brings my site to a screeching halt, usually about once or twice a day.
GET /wp-content/mu-plugins/bp-core/images/mystery-man.jpg HTTP/1.1" 500 612 "-" "Googlebot-Image/1.0(BuddyPress moved from mu-plugins into plugins)
I have been told to check my .htaccess file, but I don’t see anything wrong with it:
<FilesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Expires "Thu, 15 Apr 2015 20:00:00 GMT"
</FilesMatch>
RewriteEngine On
RewriteBase /
#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
RewriteRule . index.php [L]
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
# BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
</IfModule>
# END WPSuperCache
Options -IndexesAny help is appreciated.
Similar to the issue at:
http://buddypress.org/forums/topic.php?id=2803
Add Friend ‘hangs’ if PERMALINKS is anything but Default. The friend is actually added, but the button does not change to the ‘Friendship Requested’ but stays the same with the little animation on the side.
If you change the PERMALINKS to the Default setting, then the Add Friend functions and changes the status to ‘Friendship Requested’
BP 1.0
WPMU 2.7.1
