Pretty strange one imho. I’ve been working on porting an existing site from phpbb
over to wordpress/bbpress. While going through a final test of the port I’ve come across the following problem. Namely when in forums where you can see the latest post (along side the forum name), the name of the latest post plus its time/date are totally incorrect, however the url actually links to the correct latest post.
See: wp.photographyireland.net/forums to see.
I’ve retried all the usual recalculates etc… I have tested the port in the past and didn’t have this issue. Can anyone advise or at worst provide me with a sql updates statement to correct?
I don’t want to do the port for real if I’m going to run into this again. Tbh I do find that the import from phpbb can be a tad bit flaky at time…
Cheers
Oh, one thing. How do I get it to link to the latest reply and not the first post in the topic?
So I just installed bbPress (2.5.4) successfully after having buggy versions last week. Though I’m having a lot of issues this time. I’m using WordPress 4.1.1 and Twenty Fifteen as my theme.
I created a new forum which I called, “forum” and a topic called, “general”. When I go to view the forum, it takes me to /forums/forum/forum which I believe should be /forums/forum but I can’t go there without it redirecting me. /forums just redirects me as well.
Following the codex, I tried method two which involved using the shortcode. This works all fine until I clicked on the forum, which took me to /forums/forum/forum
My site is:
– method 1
– method 2
How can I fix this issue? Please don’t say disable plugins because I know for a fact, that isn’t the reason.
troubleshoot to find if you can pinpoint the problem.
It could be a theme or plugin issue
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
@pgmvanrijn
It could be a theme or plugin issue
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
i just tested it out and it seems to work fine.
you can find the files to install for wp-content/languages/bbPress here
http://danieljuhl.dk/wordpress/oversaettelse/
more information specifically for your language
https://codex.bbpress.org/bbpress-in-your-language/danish-dansk-da_dk/
Thanks. Nice to at least get a response, so your thoughts are appreciated.
However, the ticket you refer to is closed. The file in latest bbPress download matches the final version (smf3.php) available there, so I’m sure it’s reasonable to assume the code is the latest available.
But while waiting for some help I did some further digging in my smf database. I found one user with an invalidly formatted user_id. After removing that the import worked.
Regarding “Remap existing users to default forum roles”, the import instructions recommend running ALL repair functions after importing, which I did at every import attempt.
@kiwi3685
what importer did you use , the one listed in tools>forums Import??
because i see the bbPress one doesnt have much information in the codex and it is still in beta testing.
this could work or not , im only guessing to try to help
what you could try is go to tools>forums Repair forums and check
Remap existing users to default forum roles
and see if that fixes it.
there is also a ticket on the importer for SMF
https://bbpress.trac.wordpress.org/ticket/2380
It could be a theme or plugin issue
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
@robin-w thanks for your note — we’ve been using bbpress and buddypress with our forums for a while.
@robkk thanks for the tips. I’ve deactivated all plugins (which actually helped with another problem, so thank you!) but that didn’t seem to do the trick.
since this site is active, I’ll make a test environment to switch themes and comment back with my findings.
thanks all!
I am using the standard forum index template for the front page of my forum.
This template only shows the latest post day / time for each of the group of sub forums. What I want is to show the latest post post day / time for each of the sub-forums not just against the top level one. (see screenshot
)
How do I do this?
Wordpress v4.4.1, bbPress 2.5.4
the only thing i can think of is that you might be caching logged in users which you shouldn’t.
other than that you could see if its a plugin or theme issue.
It could be a theme or plugin issue
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
if its your theme contact your theme author.
see if the shortcode works in a default theme first
as a test switch to a default theme such as twentytwelve, and see if this fixes.
if it still doesnt see if its a plugin issue
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the issue
if its not a plugin issue and is working in a default theme then your right about it being your theme
do the other shortcodes work fine?? if so see if you only messed up this file below
did you do any customization to this file content-archive-forum.php
try this CSS code for a test to see if it works , if the background turns black it works.
input#bbp_search_submit.button {
background: black;
}
don’t know what else to suggest, bbpress is tested to work with the default themes, suggest you contact your host provider.
Per forum moderation is noted for a future release of bbPress, i think they are going to test it out on wordpress.org first.
https://bbpress.trac.wordpress.org/ticket/459
It could be a theme or plugin issue
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
Then come back
I have all the latest software and my site is
alright so basically it does what this plugin does
https://wordpress.org/plugins/page-links-to/
your forum title will show like any normal forum but if you click it , it will link to whatever you want.
works pretty good when i tested it out, it wont show in the status drop-down though it will show in another meta-box somewhere below the post content.
@s1r0n
i tested it out on your site and see its working better
its not really a honeypot field though
how a honeypot field is supposed to be is invisible to the users on your site and is not required for input for the user.
its a hidden input field that if it has any type of dummy information from spam-bots injected , it should stop the next action that the spammer is trying to do.
the way your code is arranged its close to these two plugins
https://wordpress.org/plugins/growmap-anti-spambot-plugin/ ( probably no bbpress compatibility)
https://github.com/studiohyperset/bpress-no-captcha-recaptcha ( still in development)
you might want to go to the bbpress nocatpcha plugin (when its done being developed) if you think it works better for what you need.
since you/robin found half the code im going to try to make a honeypot using these two plugins for the other half
wordpress.org/plugins/registration-honeypot/
wordpress.org/plugins/zero-spam/ (i dont know about bbpress compatibility yet)
also @s1r0n what do you mean by custom meta tags, like explain exactly how you want it so i can see if a normal seo plugin cant do this already.
Ah you’ll have to do that again. the code above has a line commented out that shouldn’t be. sorry for the hassle
add_action('bbp_theme_after_topic_form_content','lp_add_honeypot');
add_action('bbp_theme_after_reply_form_content','lp_add_honeypot');
function lp_add_honeypot() {
if (is_user_logged_in())
return;
?>
<p>
<label for="lp_post_honey_pot">I am a robot (yes/no)</label><br />
<input type="text" value="" tabindex="103" size="40" name="lp_post_honey_pot" id="lp_post_honey_pot" />
</p>
<?php
}
//https://core.trac.wordpress.org/browser/tags/4.1.1/src/wp-includes/post.php#L0
add_filter('wp_insert_post_empty_content', 'lp_check_honeypot', 10, 2);
function lp_check_honeypot($is_empty, $postarr) {
if (is_user_logged_in())
return false;
if ($postarr['post_type'] == 'topic' || $postarr['post_type'] == 'reply') {//only do this for bbspress
if ($postarr['bbp_post_as_submitted']['POST_lp_post_honey_pot'] == 'no') {
return false; //treat this post as good
}
return true;
}
return false;
}
I only need this to work for users who are not logged in, guests, so i’ve added a couple of lines to turn this off when users are logged in. if you want to test even registered users just leave those lines in.
When I have a bit of time I’ll look into bbpress errors and find a way to set an appropriate error message.
Have fun and let us know if you use it and it works for you or not
would definitely be worth you changing that back as a test and seeing if that fixes.
why not just have one form, referenced by a button at the top.
function bsp_create_new_topica () {
$text='Create New Topic' ;
if ( bbp_current_user_can_access_create_topic_form() && !bbp_is_forum_category() ) echo '<div style="text-align: center;"> <a href ="#topic">'.$text.'</div>' ;
}
function bsp_create_new_topicb () {
echo '<a name="topic"></a>' ;
}
add_action ( 'bbp_template_before_single_forum', 'bsp_create_new_topica' ) ;
add_action( 'bbp_theme_before_topic_form', 'bsp_create_new_topicb' ) ;
(not tested as its cut down code from one of my plugins)
adds a link which lets you add a link to the top of the page which sends you to the bottom, which you can easily make a button.
add to your functions file https://codex.bbpress.org/functions-files-and-child-themes-explained/
or take the guts into the template you’re amending.
You could probably send it to a collapsing div at the bottom if you tinker
That way you only have one form
ok, it’s working fine on my test site with bbpress and twentyten.
It could be a theme or plugin issue
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
Then come back