Skip to:
Content
Pages
Categories
Search
Top
Bottom

Cannot access profile page


  • amethystdragon
    Member

    @amethystdragon

    Got a bit of a weird error happening – Let me begin

    Yesterday I did a bit of work sorting out my quite frankly flaky forums – Got everything working quite nicely but then I decided to remove the Avatar Upload plugin because I couldn’t get it looking nice against the users in the forums in the time I had left

    However having turned it off I then found I couldn’t access any of the user profile pages including my own – I just get a completely blank page

    I’ve removed the calls to show the avatar on the profile page itself but its still falling over

    The site error log is reporting the following:

    [Wed Aug 15 04:24:42 2007] [error] [client 86.158.248.246] PHP Fatal error: Call to undefined function bb_get_header() in /home/httpd/vhosts/<sitename>/httpdocs/forums/profile.php on line 1, referer: http://<sitename>/forums/

    Now I know that this simply isn’t true – bb_get_header() is part of the core and its more likely that one of the plugins has gone screwy but I’ve tried turning off the plugins but I’ve done quite a bit of customisation and the majority of the plugins don’t die quietly – they cause major blow-outs if not available so I’m now having to go through all my template code and put if blocks around them to stop them

    The list of plugins I have installed are as follows

    Limit Latest Discussion 0.73

    Simple Onlinelist 1.5

    My Views 0.05

    BBPress Private Messaging 0.80

    Posts since last visit 0.5-beta

    Report Post 0.11

    Avatar Upload 0.8.2

    Private Forums 5.2

    Use Display Name 0.7.2

    bbPress signatures 0.14

    My Views module – Started/Participated Topics 0.05

    Any help would be really appreciated

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

  • _ck_
    Participant

    @_ck_

    First a quick tip: when you customise templates with a plugin function embeded, instead of this:

    <? show_blah(); ?>

    do this:

    <? if (function_exists('show_blah')) { show_blah();} ?>

    and that way if you deactivate a plugin, it will fail quietly and let the page still render.

    Now to address your problem, that error can happen if something is trying to call bb_get_header before bbpress is completely loaded somehow. Or an include could accidentally get renamed. Or some whitespace got inserted at the end of a plugin somewhere (after the ending ?>)

    You need more info. Go into your config.php and add this as the first line or so:

    error_reporting(E_ALL);

    And see what it throws at you.


    amethystdragon
    Member

    @amethystdragon

    Hmmm I’d already added the

    <? if (function_exists('show_blah')) { show_blah();} ?>

    block around stuff and I’ve added the

    error_reporting(E_ALL);

    To config.php but I’m not getting any more information – its very very odd


    amethystdragon
    Member

    @amethystdragon

    Bumping this up because I still can’t get this to work – I’ve even tried swapping back to the original kakumei template and its being an absolute pig

    Sounds like no amount of messing with the template could save you from this fate. I have no idea why you would have done this, but have you replaced profile.php in the root of bb with a template file? This is what profile.php should look like. (Your custom templates should go in a my-templates/ folder in root.)

    <?php
    require_once('./bb-load.php');

    bb_repermalink(); // The magic happens here.

    if ( $self ) {
    if ( strpos($self, '.php') !== false ) {
    require($self);
    } else {
    require( BBPATH . 'profile-base.php' );
    }
    return;
    }

    $reg_time = strtotime( $user->user_registered );
    $profile_info_keys = get_profile_info_keys();

    if ( !isset( $_GET['updated'] ) )
    $updated = false;
    else
    $updated = true;

    do_action( 'bb_profile.php_pre_db', $user_id );

    if ( isset($user->is_bozo) && $user->is_bozo && $user->ID != bb_get_current_user_info( 'id' ) && !bb_current_user_can( 'moderate' ) )
    $profile_info_keys = array();

    $posts = get_recent_user_replies( $user_id );
    $threads = get_recent_user_threads( $user_id );

    do_action( 'bb_profile.php', $user_id );

    bb_load_template( 'profile.php', array('reg_time', 'profile_info_keys', 'updated', 'threads') );
    ?>

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

You must be logged in to reply to this topic.