Thanks Stephen @netweb for looking on to this.
I really wish I could say it fixed the issue apparently I’m still getting the same error. 🙁
( ! ) Fatal error: Cannot redeclare bbp_codex_remove_counts() (previously declared in C:\wamp\www\wp\wp-content\themes\twentytwelve-child\bbpress\loop-single-forum.php:9) in C:\wamp\www\wp\wp-content\themes\twentytwelve-child\bbpress\loop-single-forum.php on line 14
I’ve got the same problem all my topics are just gone but they are still there in the back end they’re just aren’t showing up in the front-end.
I only updated to 4.0 and other than BBpress I don’t have much other plugins installed here’s a list:
adminimize
adsense-click-fraud-monitoring
amr-shortcode-any-widget
baw-login-logout-menu
bbpress
bbpress-admin-bar-addition
bbpress-custom-css-file
bulletproof-security
google-adsense-dashboard-for-wp
google-analytics-dashboard-for-wp
inactive-user-deleter
limit-login-attempts
theme-my-login
wp-user-avatar
I do think it is a conflict with the code and the newer version of WordPress as I only updated wordpress to 4.0 and the errors started to appear.
Here are lines 1356 – 1395 of the said file in the error message:
/**
* Adds ability to include or exclude specific post_parent ID's
*
* @since bbPress (r2996)
*
* @global DB $wpdb
* @global WP $wp
* @param string $where
* @param WP_Query $object
* @return string
*/
function bbp_query_post_parent__in( $where, $object = '' ) {
global $wpdb, $wp;
// Noop if WP core supports this already
if ( in_array( 'post_parent__in', $wp->private_query_vars ) )
return $where;
// Bail if no object passed
if ( empty( $object ) )
return $where;
// Only 1 post_parent so return $where
if ( is_numeric( $object->query_vars['post_parent'] ) )
return $where;
// Including specific post_parent's
if ( ! empty( $object->query_vars['post_parent__in'] ) ) {
$ids = implode( ',', wp_parse_id_list( $object->query_vars['post_parent__in'] ) );
$where .= " AND {$wpdb->posts}.post_parent IN ($ids)";
// Excluding specific post_parent's
} elseif ( ! empty( $object->query_vars['post_parent__not_in'] ) ) {
$ids = implode( ',', wp_parse_id_list( $object->query_vars['post_parent__not_in'] ) );
$where .= " AND {$wpdb->posts}.post_parent NOT IN ($ids)";
}
// Return possibly modified $where
return $where;
}
Hey there everyone,
I’ve just registered to post this problem I’m currently experiencing which happens with the latest update of WordPress.
The boards all work however the threads and the post in the frontend are all gone, they’re actually still present in the backend of the wp-admin but on the actual site they can’t be seen anymore.
This only happened after the latest wordpress 4.0 update so I’m sure it has something to do with that.
Here is a link to my website: http://sg-carterpack.com/forum/
Thanks in advance for anyone who can assist me with fixing this as I sadly did not make a backup and the forum is our sites main focus so it’s really important for me to get this fixed asap!
MODERATOR EDIT: Here is a copy of your content from your other post below
I’ve already seen a couple threads but without much avail, I’m not running any plugins mentioned in that thread yet I still experience the problem after updating to WordPress 4.0
I’ve already reverted my wordpress installation as I can’t really put the forum out for more than a day, I’m running the following plugins on my site:
Adminimize
AdSense Click-Fraud Monitoring Plugin
amr shortcode any widget
BAW Login/Logout menu
bbPress
bbPress Custom CSS File
BulletProof Security
GD bbPress Tools
Google Adsense Dashboard
Google Analytics Dashboard for WP
Inactive User Deleter
Limit Login Attempts
Theme My Login
WP User Avatar
Does anyone know what plugin could be causing the problem if this isn’t a problem with BBpress?
I made a quick fix, I added this code into content_single_topic.php under bbpress/templates/default/bbpress
<?php echo "<div style=clear></div>"; ?>
<?php echo "<br />"; ?>
<?php bbp_topic_content(); ?>
just after
<?php else : ?>
<?php bbp_topic_tag_list(); ?>
<?php bbp_single_topic_description(); ?>
<?php if ( bbp_show_lead_topic() ) : ?>
<?php bbp_get_template_part( 'content', 'single-topic-lead' ); ?>
<?php endif; ?>
and before
<?php if ( bbp_has_replies() ) : ?>
<?php bbp_get_template_part( 'pagination', 'replies' ); ?>
<?php bbp_get_template_part( 'loop', 'replies' ); ?>
<?php bbp_get_template_part( 'pagination', 'replies' ); ?>
<?php endif; ?>
It shows the content, but it is not properly formatted.
Any other fixes?
All function names need to be unique:
See the WordPress Plugin Handbook for more details:
Sanity Practices
You can achieve this simple by prefixing the function names with your name: 🙂
function donalyza_remove_counts() {
$args['show_topic_count'] = false;
$args['show_reply_count'] = false;
$args['count_sep'] = '';
return $args;
}
add_filter('bbp_before_list_forums_parse_args', 'donalyza_remove_counts' );
Our codex articles will need to be updated to include prefixes so there are none of these conflict, suggestion might be bbp_codex_ so that way a hint is also given where the custom function may have originated from 😉
I was trying to follow the step by step guide to bbpress forum – part 3
I copied the the function below and add it on line 9 of loop-single-forum.php file.
function remove_counts() {
$args['show_topic_count'] = false;
$args['show_reply_count'] = false;
$args['count_sep'] = '';
return $args;
}
add_filter('bbp_before_list_forums_parse_args', 'remove_counts' );
Then I ran my forum site and got this error.. I’m doing this locally to test.
“Fatal error: Cannot redeclare remove_counts() (previously declared in C:\wamp\www\wp\wp-content\themes\twentytwelve-child\bbpress\loop-single-forum.php:9) in C:\wamp\www\wp\wp-content\themes\twentytwelve-child\bbpress\loop-single-forum.php on line 14“
ok i havent really messed with breadcrumbs that much i usually remove them but there suppose to show home > forums > forums i think from what i just tested on my localhost.
since it shows the root anyway if you are already on the forum archive.
but i did end up removing one of the forums link this weird way
ok i dont know for sure what i did because i was basically just fiddling around so here are all of what i did
i had this in my functions php in my own thematic child theme.
function mycustom_breadcrumb_options() {
// Home - default = true
$args['include_home'] = false;
// Forum root - default = true
$args['include_root'] = true;
// Current - default = true
$args['include_current'] = true;
return $args;
}
add_filter('bbp_before_get_breadcrumb_parse_args', 'mycustom_breadcrumb_options');
add_filter( 'bbp_get_breadcrumb', 'change_breadcrumb_text' );
Function change_breadcrumb_text ($trail) {
$trail = str_replace ('No Labels Community Forum','N L C F',$trail) ;
return $trail ;
}
then i removed the add_filter line for the mycustom_breadcrumb function
so i have this now.
function mycustom_breadcrumb_options() {
// Home - default = true
$args['include_home'] = false;
// Forum root - default = true
$args['include_root'] = true;
// Current - default = true
$args['include_current'] = true;
return $args;
}
add_filter( 'bbp_get_breadcrumb', 'change_breadcrumb_text' );
Function change_breadcrumb_text ($trail) {
$trail = str_replace ('No Labels Community Forum','N L C F',$trail) ;
return $trail ;
}
this removed one of the NLCF links in the breadcrumbs.
i even removed the my custom breadcrumbs function and its still only shows one NLCF link…
its weird :/
Hi !
Using the Plugin Shortcodes Ultimate I have created tabs in my WordPress Install.
Anyway I can do the same in bbPress ?
As an example please see :
Songs to Ponder Over
the starting post has tabs and was made in WordPress.
The replies are coming from the bbPress side and I’d like to make similar tabs in the same…
Shortcodes Ultimate plugin doesn’t seem to be working in bbPress.
All advise / Workabouts much appreciated. thanks !
I did contact them but they told me that it would be custom development and it would be outside of the scope of their support :/
did you tell them that your topic and posts count should be beside the subforums.
if you just told him categorized layout they might be just thinking of the way the layout is structured , like this layout in the link where the subforums are alligned up to the categories.
http://tamrielfoundry.com/forums/
in all seriousness you should get some support from them.
The templates you should mess with are content-archive-forum.php content-single-forum.php loop-forums.php loop-single-forum.php
other than that its really hard for me to help from here since its a premium theme.
Maybe could I request for this thread to be moves to the Themes board?
i dont really know what your saying here, but i guess like i said try to contact them, they should help you out more since its most likely the themes problem.
Hi,
I have additional information.
Even if I include my home page in breadcrumbs ($args['include_home'] = true;), on the Forum Page the page title still links to itself and in breadcrumbs there is still an additional link prior to current that links to the Forum Page – itself. Everything after that in breadcrumbs is fine.
Thank you for your time.
Jerry
Your theme is doing this:
Look at your CSS file, line #95
ul li:before {
position: absolute;
font-family: Arial, sans-serif;
content: "\e98a1e";
color: #f6cf08;
font-size: 14px;
line-height: 20px;
left: 0;
top: 0;
}
It’s inserting content: "\e98a1e"; before every unordered list element.
You see the same issue on your about page http://bmslifttruck.com/about/
I’d suggest contacting the theme authors, about this, it has nothing to do with any encoding issues, and p.s. any encoding issues in a WordPress world you should use UTF8 😉
bbp_has_topics has a ‘reset’ in it, it executes
new WP_Query( $r )
what is the loop in your sidebar?
2014 bbPress Survey Results
6. Twenty-three percent of participants have not added any bbPress add-on plugins nor custom code at the time of survey. Additional research showed the majority of those who have not installed such are those who use bbPress for their own sites.
For the rest of the participants, there are a few who mentioned that they have too many plugins in their installations to list in the survey form. For those who shared what plugins they have activated in their installations, following shows the top ten plugins which are either bbPress-specific or those with expressed support for bbPress.
visualization of plugins used
a) GD bbPress Attachments
b) GD bbPress Tools
c) bbPress Enable TinyMCE Visual Tab
d) BuddyPress
e) Buddy-bbPress Support Topic
f) Custom private code
g) bbPress – Private Replies
h) bbPress Stay Checked
i) bbPress Topics for Posts
j) bbPress – Mark As Read
this box has 3 classes allocated
#link-modal-title
#link-selector
#submitbox
so something like
#link-modal-title,
#link-selector,
#submitbox {
Background #21201f !important ;
}
added to your style.css should fix it.
Come back if that is not clear.
the line for the button is
<button type="submit" name="user-submit" id="user-submit" tabindex="<?php bbp_tab_index(); ?>" class="button submit user-submit"><?php _e( 'Log In', 'bbpress' ); ?></button>
so class is “button submit user-submit”
Hi!
There is one loop on main content with topics of one tag (archive) and second loop on the sidebar:
if ( bbp_has_topics( array( 'author' => 0, 'order' => 'DESC', 'paged' => 1, 'posts_per_page' => $number_of_topics ) ) ) :
bbp_get_template_part( 'loop', 'mytopics' );
This second loop should display all global topics but it shows the same topics like the 1st loop. How to fix it?
Can anyone help me in changing the size of the login button on the bbpress login widget. I must of tried over 20-30 different css codes, clearing cache and logging in and out and no matter what I do I cannot change the size of the login button.
I applied this code to change the size of the submit button
#bbpress-forums .submit {
background-color: ##a0668d;
color: #000000;
float: center;
vertical-align: middle;
border-radius: 10px;
height: 35px;
width: 80px;
font-size: 18px;
}
but I cannot locate the login button that is coming through the widget, even after inspecting with firebug and trying for the past 2 days.
No sorry, the shortcode uses it’s own method, and without a re-write there’s no quick way to fix this.
In playing around I noticed some odd behavior…
I decided to just try full width forums, however, the forum index always looked off to the right as if it had a blank sidebar (I copied page.php to bbpress.php in the child template folder).
I then created a new page and put the forum index short code in it. On this one, full width worked fine for everything. The installation instructions indicated to create a page with the same name as the forum root slug (forums) and you wouldn’t have to use the short code. I changed the forum root slug from forums to forums2 and put the short code in the forums page and full width worked fine.
Thus, what I found out, I can get full width to work okay if I don’t name the forums page the same as the root slug.
Still can’t figure out the sidebar thing though…
Bob
This does not work in the shortcodes. For example when I show a topic on a page using the shortcode [bbp-single-topic id=134]. I see the posts in descending order in the forum, but on the page its in Ascending order.
Not sure whats going on, please help any one.
@netweb wow you remember everything!
@pooledge я думаю это потому что у тебя в адресе:
/pup4b/форумы
И мой совет, как человека, который пробовал бесплатный хостинг в Hostinger – купи нормальный хостинг за 150 рублей в месяц хотя бы и не мучайся. У них сайты вечно падают, я брал бесплатное демо ради интереса – ужаснулся.
Cheers for the response and thanks for your time and effort looking into this, much appreciated.
For the test below i set up a hidden forum on my live server.
What happens when you deactivate either/or “Go to first unread” & “Unread posts” plugins you’re using and submit a reply to an affected topic?
- I just went through all the bbpress related plugins and tried different combos and didn’t notice any significant performance differences.
Another test, this time with the ‘Quotes’ plugin disabled submit a reply to an affected topic.
- Using GDPress and had the same results as above
Another, what code and/or plugin are you using to show the user registration in each reply e.g. Join Date: Mar 2009
And another, what code and/or plugin are you using for the counts shown next to the username in each reply e.g Posts: 4529
- Using the function below. Again I disabled and noticed no significant improvement.
function func() {
$roleData = bbp_get_user_role(bbp_get_reply_author_id( $reply_id ));
if($roleData=='bbp_moderator'){
$data='<div class="bbp-author-role">Moderator</div>';
}
$registered = date("M Y", strtotime(get_userdata(bbp_get_reply_author_id())->user_registered));
$post_count = bbp_get_user_reply_count_raw( bbp_get_reply_author_id( $reply_id )) ;
$data.='<div class="bbp-reply-ip"><span class="bbp-author-ip">';
$data.='Join Date: '.$registered;
$data.='<br />';
$data.='Posts: '.$post_count;
$data.='</span></div>';
}
Here’s the results for the first query
And the second query
Something I did notice when testing, was that when I was posting in the new topc I created, posts seemed to be submitting relatively quicker, 2 – 5 secs per post. Though when posting in a thread that had a lot more replies the post submission took a lot longer.
I tried the query plugin you suggested and getting relatively good results everything is < 2 secs, but it only shows the performance of the query results, and doesn’t take into account the time it takes to submit, which is > 10 secs. (unless I’m overlooking something??)
Thanks
Try (haven’t tested)
function remove_website ($r) {
$r['bbp_anonymous_website'] = false;
return $r ;
}
add_filter( ‘bbp_pre_anonymous_post_author_website’, ‘remove_website’ );
or
function remove_website ($r) {
$r['bbp_anonymous_website'] = false;
return $r['bbp_anonymous_website'] ;
}
add_filter( ‘bbp_pre_anonymous_post_author_website’, ‘remove_website’ );