Skip to:
Content
Pages
Categories
Search
Top
Bottom

Issue since upgrade to 2.4


  • PureLoneWolf
    Participant

    @purelonewolf

    Hi there

    I have bbPress (along with BuddyPress) on two, fundamentally, identical websites.

    However, on http://www.wolflan.com, I have no issues, but on clan.wolflan.com I have a couple of weird ones.

    They are both even using themes from the same author.

    On wolflan.com, I was able to use

    function custom_bbp_list_forums() {
      $args['separator'] = '<br />';
     
      return $args;
    }
     
    add_filter('bbp_before_list_forums_parse_args', 'custom_bbp_list_forums' );

    in my themes functions.php, and therefore get the sub-forums on their own line. Additionally, I was able to add individual forums to the site navigation menu (Appearance/Menus).

    On clan.wolflan.com I was able to get the sub-forums on their own line, up until I upgraded to 2.4. At which point, my private forums moved to the bottom and the code above stopped putting the sub-forums on their own line. Today, I decided that I would like to have forums on the navigation and noticed that I have no option for this.

    Both sites are running an identical plugin list, they are both on the latest versions of all plugins and are also running WP3.6.1 as of this morning.

    Would anyone have any ideas?

    I have linked to images that show the issue:

    wolflan.com
    Fully working, modded functions.php
    fullworkingfunctionsmod.png
    Fully working, wordpress menu editor
    fullworkingmenueditor.png

    clan.wolflan.com
    Not working, modded functions.php
    nonworkingfunctionsmod.png
    Not working, wordpress menu editor
    nonworkingmenueditor.png

    Would anyone have any ideas as to what I can do to solve these two issues?

    Many thanks
    Dave

Viewing 15 replies - 1 through 15 (of 15 total)

  • Kaliceos
    Participant

    @kaliceos

    I’m not good enough in PHP and wordpress filters to help you, but you should check the diff between 2.3 and 2.4 for the /includes/common/functions.php around line 1158. Some changes were made to the bbp_parse_args function.

    Otherwise, you can edit (or create) your theme’s bbpress/loop-single-forum.php and edit the bbp_list_forums() line 30 to bbp_list_forums(array (‘separator’ => ‘<br />’)). That should do the trick.


    PureLoneWolf
    Participant

    @purelonewolf

    I’ll take a look, but I should point out that this issue is occurring with all themes, including the default BP theme. I am starting to think that something has gone screwy with bbPress, especially as I am unable to add any forums to the menu (the Forums page is no problem)

    I am going to download the theme that is working, and the bbpress plugin from the working site and upload over the top and see if that makes a difference.

    Cheers


    PureLoneWolf
    Participant

    @purelonewolf

    Ok. I have now done the following:

    Copied the entire bbPress (plus bbPress plugins) folder from the working site.
    Copied the working theme from the working site.

    Deactivated deleted bbPress (plus bbPress plugins) from the non-working site
    Uploaded bbPress and plugins to the non-working site.
    Uploaded theme
    Activated all on the non-working site

    This didn’t work. Forums remain stubbornly on one line and the Forums option doesn’t appear in the WP menu editor.

    On top of that, I then deactivated and deleted bbPress..then re-installed through the WP Add New Plugin interface.

    This also didn’t work. No change whatsoever. I am going to have to build a test site and re-build the site I think.

    What would be the easiest way to get the forums/posts/users etc brought over?

    Many thanks

    **EDIT**
    This just gets weirder and weirder. I just created a blank, brand new installation of wordpress. Installed buddypress, then bbpress. Went to Appearance/Menus and Forums does not show up.


    Kaliceos
    Participant

    @kaliceos

    I’m running latest releases of WordPress and bbPress, and I don’t have any problems neither with the custom function (placed in my theme’s functions.php) nor with the menus.
    Edit after your edit : I also have buddyPress installed

    What theme are you using ? The bbp_list_forums may be used in a different way in the theme where it doesn’t work.

    For the menus, I don’t know what could cause this issue, have you tried with an other theme ?

    If you want to rebuild your site, take a look at the Tools > Export and Tools > Import in your dahsboard, you’ll be able to transfer your forums, topics and posts.
    For users, it looks like the plugin AEIOU can do that. Otherwise, transferring the mysql tables (wp_users, wp_usermeta and if you use buddyPress wp_bp_xprofile_*) should work too.
    I guess you have to import users before forums, posts, and topics if you want to keep the author relation.


    Kaliceos
    Participant

    @kaliceos

    By the way, have you checked in Appearance > Menus, then just under the toolbar there’s a ‘Screen options’ menu where you can choose which post types appear ?


    PureLoneWolf
    Participant

    @purelonewolf

    See…now I feel like a complete moron. No, I had not checked the “Screen Options” option…although, in my defense, I have never adjusted that on the working site either…

    So that’s the menu issue sorted now…/facepalm. I always say to check the simple stuff first, I should probably listen to myself from time to time.

    What is confusing me about the functions.php mod..is that, to test, I have actually taken a copy of the working theme from the working site..and it still fails. It actually fails on every theme I give it. It literally happened when I upgraded to 2.4. I had the main site open in another tab, updated the bbpress plugin, switched to the other tab and hit refresh…where it immediately went to what it is now.

    I thought it might be plugin related, so I deactivated any differences between the sites, and still nothing.

    Is there another way to get this change, other than in the themes functions.php?


    Kaliceos
    Participant

    @kaliceos

    Don’t worry, it happened to me once, that’s how I discovered the existence of this menu ^^

    For the function, have you tried what I said a few posts before :

    Otherwise, you can edit (or create from /wp-content/plugins/bbpress/templates/default/bbpress/) your theme’s /bbpress/loop-single-forum.php and edit the bbp_list_forums() line 30 to bbp_list_forums(array (‘separator’ => ‘<br />’)). That should do the trick.

    That may work as it doesn’t require the use of bbp_parse_args() which seems to be the problem in your case.


    PureLoneWolf
    Participant

    @purelonewolf

    Thanks for the pointers…I am getting closer. Now, when I click on the Sub-Forum, it displays it’s sub-forums correctly. The main forum list is still not displaying correctly though :(

    Would you have an idea what I should be editing to affect the main forum index?

    Many thanks for all of your help.

    Dave


    Kaliceos
    Participant

    @kaliceos

    Normally, the main forum list is built using loop-single-forum.php but your theme may work in a different way. Can you put on pastebin.com your bbpress/loop-single-forum.php and bbpress/loop-forums.php from your theme or child-theme ?


    PureLoneWolf
    Participant

    @purelonewolf

    Hi there

    The theme itself doesn’t supply any bbpress templates, so I copied loop-single-forum.php from the bbpress default theme and created a theme/bbpress folder and dropped it in there.

    http://pastebin.com/dARzjbvb

    There is no loop-forums.php file in there at the moment.

    Many thanks


    Kaliceos
    Participant

    @kaliceos

    I went to clan.wolflan.com and your source code looks like some paragraphs were added by your editor as I see some <p> and </p> in weird places. What software did you use to edit loop-single-forum.php or your functions.php ?

    I was not able to check because some of your forums are private, but what’s the html source code for the list of subforums ? (I mean in the browser) Is there a <br /> between the list of subforums ? Because, when I watch your screenshot, subforums are not separated by a comma, so I guess the function did his job, but your code may be broken because you used WordPress editor or an other editor that deleted the <br />.

    Anyway, in your case, the simplest solution may be using some CSS. And as you said, simple stuff first ! You wouldn’t need to change any php template. You may try something like that in your style.css or Custom CSS if you use Jetpack :

    #bbpress-forums .bbp-forums-list li {
      display: block;
    }

    If it works, I don’t know what was the problem with the bbp_list_forums() function, but you will not need to use it and you can delete the custom loop-single-forum.php that you copied to your theme’s directory if you had not made other edits.


    PureLoneWolf
    Participant

    @purelonewolf

    Thanks – The CSS worked perfectly.

    The view source on the subforum view is http://pastebin.com/YDU3fNqm

    I always edit with notepad++, always have. In fact, the edits performed on the other site were done in the same way.

    I keep thinking a plugin has caused this behaviour, but can’t track it down. As the issue exists on every theme that I upload to the site.

    Ah well, it’s sorted now and I thank you very very much for your efforts and help. It is much appreciated :)

    Thanks
    Dave


    Kaliceos
    Participant

    @kaliceos

    As you can see on line 478 from the code you pasted, the <br /> is here, but I guess it’s not interpreted because it’s just at the end of the < li > element, which is displayed inline. These CSS properties are not easy to use. Maybe a plugin added a css that caused the issue.

    But your problem is solved, that’s the main thing :)


    Stephen Edgar
    Moderator

    @netweb

    I haven’t got much else to add except I think you have tried everything to find ‘spot the difference’ ;)

    I am glad it is sorted though.

    If you have SSH access to your host go on a code hunt ;)

    grep -i -r 'bbp_list_forums' * and/or grep -i -r 'bbp-forums-list' *

    This will find any reference to the term ‘bbp_list_forums’, there might be some rogue hiding spot where this is being used as a custom function somewhere.


    PureLoneWolf
    Participant

    @purelonewolf

    Thanks. I grep’d the entire server and only found it listed where I expected to find it. It just gets weirder and weirder. I think I will leave it alone..it works now and I guarantee I will make it worse.

    Thanks, once again, for all your help both of you :)

Viewing 15 replies - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.