mocha365 (@mocha365)

Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • In reply to: Undefined index error

    Martin J
    Participant

    @mocha365

    I just did that actually….didn’t see the notice until I activated the bbpress toolkit plugin previously. If I disable it, then it goes away. If I turn off debug in config, the message goes away.

    In reply to: Undefined index error

    Martin J
    Participant

    @mocha365

    Greetings.

    bbPress Version 2.5.14
    Only shows if I have debug on, and noticed this on the main “forums” page. I should also mention that this started to show when I activated the bbPress Toolkit plugin Version 1.0.12

    But when I noticed the error message related to a bbpress includes file, I thought I would post this.


    Martin J
    Participant

    @mocha365

    Nope, only the adminbar on the front-end of the site. But that’s the issue, when I log in, I get redirected to the front-end of the site. I have to manually type in any admin page…basically /wp-admin.php

    So something about bbpress is doing this. Again, if I disable bbpress, everything goes back to normal.


    Martin J
    Participant

    @mocha365

    Any other ideas, or is this something I should put in as a bug report?


    Martin J
    Participant

    @mocha365

    Thanks for the follow up. Here is what I did…

    1. Disabled all plugins except bbpress
    2. I switched to a WP default theme, ie: twentyfifteen and twentyseventeen
    3. Did the above with Chrome, Firefox, and MS Edge browsers

    Same thing still happens. So with the admin bar disabled, and logging in from the default WP login screen, and with bbpress enabled, I just get redirected to the site’s front page — no admin page. So I still have to add wp-admin/ at the end of the url address to get into the admin area. If I disable bbpress, then everything works normal. Enable it again, goes back to the issue.

    As mentioned, I’ve encountered this for at least a couple years. So based on testing, it’s not theme related and not plugin (other plugins) related. Something about bbpress is redirecting after logging in with the default WP login and not sending me directly into the admin.

    If there is something coded in bbpress for “Forum logging in” for front-end users, then I can see this being relevant. However, logging into the admin, is the problem.


    Martin J
    Participant

    @mocha365

    Actually…. the solution above wasn’t going to work because if breadcrumbs are enabled and someone clicks on the “Forum Home”, we lose all the effort. However, I finally found the conditional statement that works.

    This is only part of my code, but you can get the idea…I originally had this:

    
    // For Jetpack Portfolio heading
    elseif (is_post_type_archive()) :
    echo '<h1 id="bts-page-title">' . __( 'WordPress Themes', 'bts' ) . '</h1>';
    
    // For bbpress forum heading
    elseif (is_bbpress('forum')) :
    echo '<h1 id="bts-page-title">' . __( 'Support Forum', 'bts' ) . '</h1>';

    However, when I did this, it worked:

    // For bbpress forum heading
    elseif (is_bbpress('forum') || is_post_type_archive('forum') ) :
    echo '<h1 id="bts-page-title">' . __( 'Support Forum', 'bts' ) . '</h1>';
    
    // For Jetpack Portfolio heading
    elseif (is_post_type_archive()) :
    echo '<h1 id="bts-page-title">' . __( 'WordPress Themes', 'bts' ) . '</h1>';

    Now what is interesting, is that if I have the bbpress conditional “after” the Jetpack portfolio one, it would not work and the bbpress heading would be “WordPress Themes”. However, I had this sudden thought that perhaps there is a priority happening here, so I moved the bbpress conditional “before” the Jetpack one, and sure enough it works. The bbpress heading is “Support Forum” and the Jetpack portfolio is “WordPress Themes”.

    Something about the sequence caused an issue…what and why I do not know.


    Martin J
    Participant

    @mocha365

    Ah….found a fix for the above/last reply. I added the id of the page, so now the custom-bbpress.css only loads for bbpress and that page.

    if (is_bbpress() || is_page( 209 ) ) :


    Martin J
    Participant

    @mocha365

    Update: I had this in my functions:

    if ( is_bbpress()) {
    ….etc.

    But adding:

    is_page()

    Means that the custom-bbpress.css is going to load on all “pages”. A temporary solution, but not really the right solution.


    Martin J
    Participant

    @mocha365

    Not quite what I was looking for in way of “conditionals” but I have to admit your method (albeit unconventional) worked like a charm, although my custom CSS for bbpress is not inherited. I will need to see about fixing the custom css styles.

    Anyway, thanks.

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