BuddyBoss Home – Web Support Forums Themes Boss. theme 404 page display

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Question

    #38420
    @jellyjumpmedia

    I have a job plugin installed (wp job manager) and find I get a 404 page returned when selecting the job to view.

    Long story short I have found that this is happening only when I have the boss child theme active (which of course it should be as I have many custom settings). The plugin works completely fine if I have the Twenty Fourteen theme active and also if I have the (master) Boss theme active, but as soon as the child theme has been activated I get the 404 page error.

    I have done all normal things such as permalinks, clearing of cache, uninstall re-install of the job plugin etc as well as checked all mod_rewrite settings in both my .htaccess file and even through my Apache server and it points to only return a 404 page when the Boss child theme is active.

    Can anyone make a suggestion on what I can look at next to try and resolve this please?

    Thanks

    Answers

    #38421
    @vapvarun

    hi @jellyjumpmedia i am not able to replicate you issue
    i had installed the wp job manager plugin and able to add jobs and view them.

    Regards
    Varun Dubey

    #38424
    @vapvarun

    @jellyjumpmedia i had added different job manager plugin screenshot earlier, have tested wp job manager and job manager both

    both worked normally

    #38438
    @jellyjumpmedia

    Thanks, it is a strange one that’s for sure. I have actually been troubleshooting this for the past week or so and been working with another plugin developer as originally I thought it was a fault with their job board plugin, so with that in mind I installed a different job plugin (wp job manager) but the same problem occurs, of course none of these plugins are yours and I wouldn’t expect you to troubleshoot them that’s why I have been troubleshooting it the past week without reaching out to you guys.

    It’s only now I notice that I have this problem with the activation of the Boss child theme only (as I say, it’s strange).

    I’ll try to explain a little more. Two screenshots attached.
    – 1st shows the job page URL with job listings (I have one displayed as a test job although I have tested with many dummy jobs). This page displays and looks fine. I then select the job posting
    – 2nd shows a new URL which is meant to link through to the actual job details but this is where the 404 is returned. You will notice the slug change from JOBS to JOB (missing the ‘s’)

    If I activate any other theme including your Boss theme (not child) the URL’s in both screenshots stay the same but the posting displays with no problem.

    I do have some custom unctions in my functions.php in my child theme. Below is the code I have within that (I apologise for the mass content but not quite sure how else I can display code in this post `// logout redirect

    add_action(‘wp_logout’,’go_home’);
    function go_home(){
    wp_redirect( home_url() );
    exit();
    }

    // logged in user redirect to different home page to logged out users
    if( is_user_logged_in() ) {
    $page = get_page_by_title( ‘Logged in home page’);
    update_option( ‘page_on_front’, $page->ID );
    update_option( ‘show_on_front’, ‘page’ );
    }
    else {
    $page = get_page_by_title( ‘home’ );
    update_option( ‘page_on_front’, $page->ID );
    update_option( ‘show_on_front’, ‘page’ );
    }

    // reorder profile nav bar
    function my_change_profile_tab_order() {
    global $bp;
    $bp->bp_nav[‘profile’][‘position’] = 10;
    $bp->bp_nav[‘wall’][‘position’] = 20;
    $bp->bp_nav[‘photos’][‘position’] = 30;
    $bp->bp_nav[‘notifications’][‘position’] = 40;
    $bp->bp_nav[‘messages’][‘position’] = 50;
    $bp->bp_nav[‘following’][‘position’] = 60;
    $bp->bp_nav[‘followers’][‘position’] = 70;
    $bp->bp_nav[‘friends’][‘position’] = 80;
    $bp->bp_nav[‘groups’][‘position’] = 90;
    $bp->bp_nav[‘forums’][‘position’] = 100;
    $bp->bp_nav[‘settings’][‘position’] = 110;
    }
    add_action( ‘bp_setup_nav’, ‘my_change_profile_tab_order’, 999 );

    // replace @wordpress email address with site branded address
    /* auto-detect the server so you only have to enter the front/from half of the email address, including the @ sign */
    function xyz_filter_wp_mail_from($email){
    /* start of code lifted from wordpress core, at http://svn.automattic.com/wordpress/tags/3.4/wp-includes/pluggable.php */
    $sitename = strtolower( $_SERVER[‘SERVER_NAME’] );
    if ( substr( $sitename, 0, 4 ) == ‘www.’ ) {
    $sitename = substr( $sitename, 4 );
    }
    /* end of code lifted from wordpress core */
    $myfront = “administrator@”;
    $myback = $sitename;
    $myfrom = $myfront . $myback;
    return $myfrom;
    }
    add_filter(“wp_mail_from”, “xyz_filter_wp_mail_from”);

    // hide buddyboss social section in front end and edit profile pages
    function remove_bb_social(){
    remove_action( ‘bp_after_profile_field_content’ , ‘buddyboss_user_social_fields’ );
    }
    add_action( ‘init’ , ‘remove_bb_social’ );

    //hide admin user from member list
    add_action(‘bp_ajax_querystring’,’bpdev_exclude_users’,20,2);
    function bpdev_exclude_users($qs=false,$object=false){
    //list of users to exclude

    $excluded_user=’1,2,3′;//comma separated ids of users whom you want to exclude
    if($object!=’members’)//hide for members only
    return $qs;
    $args=wp_parse_args($qs);
    //check if we are searching for friends list etc?, do not exclude in this case
    if(!empty($args[‘user_id’])||!empty($args[‘search_terms’]))
    return $qs;
    if(!empty($args[‘exclude’]))
    $args[‘exclude’]=$args[‘exclude’].’,’.$excluded_user;
    else
    $args[‘exclude’]=$excluded_user;
    $qs=build_query($args);
    return $qs;
    }

    #38461
    @jellyjumpmedia

    I have mode some progress, I swapped over my functions.php which has custom functions in with the original functions.php file and the problem goes away so with that I added each custom function one by one testing each before I applied the next.

    It appears the one custom function that is causing this problem is

    // logged in user redirect to different home page to logged out users
    if( is_user_logged_in() ) {
    $page = get_page_by_title( ‘Logged in home page’);
    update_option( ‘page_on_front’, $page->ID );
    update_option( ‘show_on_front’, ‘page’ );
    }
    else {
    $page = get_page_by_title( ‘home’ );
    update_option( ‘page_on_front’, $page->ID );
    update_option( ‘show_on_front’, ‘page’ );
    }

    If do not add this function to the functions.php file it works as it should with no 404 error.

    This function code is to allow users when logged in to view a different home page (the main home page is great for non-logged in users as it displays things such as ‘create an account’ and ‘login’ but when logged in it makes no sense having this kind of page layout).

    I will need to play about with the code or as it wasn’t my code at least see if I can find something similar to allow a different home page from being viewable when logged in (without having to redirect to that page as I want my logged in users to be directed to which ever page they were one when the logged in, the logged in users home page will be viewable when the users selects the ‘home page’)

    If you don;t mind I’ll keep this thread open for now in case one of the buddyboss team or your users have a suggestion on how I can get the logged in logged out home page to work without giving the the 404 error.

    Thanks

    #38462
    @vapvarun

    @jellyjumpmedia It will be better you use some membership plugin or role base redirection approach.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The question ‘404 page display’ is closed to new replies.