Skip to:
Content
Pages
Categories
Search
Top
Bottom

Username not showing on profilepage


  • bassieappelman
    Participant

    @bassieappelman

    As can be seen on:
    http://allforfun-gaming.com/users/bas/

    The profilename does not show up.

    I have already checked member-header.php and the item-header div and content is all there with the following line:
    <h2>
    “><?php echo bp_get_displayed_user_username(); ?>
    </h2>

    I have tried different shortcodes where the ”echo bp_get..” is now, but nothing works.
    My page also gives an error when you do inspect element and it says syntax error on that particular line of html.

    Can’t find how to get the username back, not sure what I changed so that it stopped showing..

    I run wordpress 4.0 and version 2.1.1 of buddypress. The website is hosted on my own vps.

    Anyone have any idea what to do?

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

  • bassieappelman
    Participant

    @bassieappelman

    BTW:
    The exact error is:
    Uncaught SyntaxError: Unexpected identifier

    And it refers to lines::

    <div id="item-header" role="complementary">
    
    		
    
    <div id="item-header-avatar">
    	<a href="http://allforfun-gaming.com/users/bas/">
    
    		<img src="https://secure.gravatar.com/avatar/218d45d5cd0d17744625a0834a89d9e2?d=mm&s=150&r=G" class="avatar user-1-avatar avatar- photo" width="150" height="150" alt="Profile picture of Woooooo">
    	</a>
    </div><!-- #item-header-avatar -->
    
    <div id="item-header-content">
    
    	
    	<span class="activity">active right now</span>
    
    	<div id="mycred-my-rank"><span>Rank</span>: Newbie </div><div class="mycred-balance mycred-mycred_default">Points balance: 26.00</div>
    	<div id="item-meta">
    
    		
    		<div id="item-buttons">
    
    			
    		</div><!-- #item-buttons -->
    
    		
    	</div><!-- #item-meta -->
    
    </div><!-- #item-header-content -->
    
    	</div>
    

    As you can see, the entire title with the h2’s is missing in here, while I can find it in member-header.php as you can see here

    <div id="item-header-content">
    
      <h2>         
      <a href="<?php bp_displayed_user_link(); ?>"><?php bp_displayed_user_fullname(); ?></a>     
      </h2>
    
    	<?php if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() ) : ?>
    		<span class="user-nicename">@<?php bp_displayed_user_mentionname(); ?></span>
    	<?php endif; ?>

    Hugo Ashmore
    Participant

    @hnla

    Markup should be displaying regardless, fact it doesn’t appear to be might suggest not actually focussing on correct templates? have you overridden defaults?

    Is this a site under development? if it is do get rid of that caching plugin, even if it isn’t disable/clear cache while attempting to track issues down.


    bassieappelman
    Participant

    @bassieappelman

    Thanks for the reply.

    I have no idea whether I have overridden default and if I have, I can not remember as to where I did.
    I thought so as well, but I can’t seem to find anything when I look at some php files I remember editing. Any way to find out what is overriding this function?

    And is it not possible to override this possible override again posting it in another php script? (although this sounds hacky, I just want it to work 😀 )

    Yes the site is under development, I installed the cache plugin because I was told it was a cache error and if the cache was deleted the name would appear again. Well I deleted the cache using WP Super Cache and nothing happened so far.


    Hugo Ashmore
    Participant

    @hnla

    no it’s only a cache error if you had installed a caching plugin in the first place, unless you have tweaked your server in some arcane manner – get rid of the caching plugin they are a bloody nuisance, use it when you’re live if you really need to but then not for dynamic pages which BP’s mainly are.

    BP uses page.php in theme compat mode where the user name is injected into the WP title() function – or you can override that template file with your own located under either ‘community’ or ‘buddypress’ in your theme root, further to that you can replace the use of /members/single/home.php with index.php and variations of that as explained in the codex; lastly you could be running the older bp-default templates in which case you may have /members/ in your theme root which BP will detect and assume an override of theme compatibility mode is required.


    bassieappelman
    Participant

    @bassieappelman

    I can not find page.php to be honest, nor know what to do with that if I do find it.

    I found the home.php and it has the line

    <div id="content">
    		<div class="padder">
    
    			<?php do_action( 'bp_before_member_home_content' ); ?>
    
    			<div id="item-header" role="complementary">
    
    				<?php locate_template( array( 'members/single/member-header.php' ), true ); ?>
    
    			</div><!-- #item-header -->

    That looks like it should work right?
    But you say to replace the use of it with index.php, could you explain me how to?

    I am not running the older bp-default templates I guess, as I do not have that folder.

    Might just backup my database and delete buddypress to do a clean install once again, will just have to save some of my custom functions then. Because I can not seem to find anything wrong anywhere. (Yes I am kind of a noob when it comes to this 🙂 )


    bassieappelman
    Participant

    @bassieappelman

    I set Usergroups in Buddypress Settings to active (no idea why I tried this, but I did), now it does show a name but a lot uglier than before..


    bassieappelman
    Participant

    @bassieappelman

    All names are just wrong now.. it shows normal names on the profile page instead of usernames, same for in the forums at the ‘Freshness’.

    I will just reinstall buddypress I think..

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Username not showing on profilepage’ is closed to new replies.
Skip to toolbar