BadgeOS Community Add-on
[resolved] For anyone with issues with the "Achievements" tab on user profiles. (7 posts)

  1. Michael Beckwith
    Plugin Author

    Posted 1 year ago #

    This is not in response to anyone specific, just a response to the issue at hand.

    The BadgeOS Community Addon checks for a few things before it generates the necessary information to create the "Achievements" tab. First it checks that there are any achievements awarded to the currently displayed user. If there are, it will start to loop through them all. In that loop, it constructs some variables to use, and it checks that we actually have an achievement to display. Lastly, it checks if the current achievement is set to be public for BuddyPress profiles. If all of these are met, it creates the parent tab for the main menu, and achievement type submenu tabs for each type that the user has earned. When you click a type, all of the achievements of that type get ajax loaded and displayed.

    To confirm that a tab should be display when it isn't, check the following two things.

    1. Has the user earned any achievements yet.
    To check, visit their user profile via the Users admin and click edit on their user. The achievements will be towards the bottom
    2. Of those earned achievements, are the types they're related to supposed to be displayed on the BuddyPress profiles.
    To check, visit the BadgeOS > Achievements Types area. Click to edit them, and check the two checkboxes that appear under the main settings. If they are not checked, enable that and hit save.
    **If you want to go the extra mile, check the database and wp_postmeta table for a set meta_value for the meta key of _badgeos_show_bp_member_menu

    If you have confirmed that the user has BuddyPress-displayed achievements, and are still not seeing an "Achievements" tab properly, let me know. If the website is publicly accessible, even if not "live", that will be a big help for us, though a localhost install still won't be impossible.

    IF you are not having issues with the tab itself, but more the area where the achievements should be showing, then let me know, and I'll do what I can to help debug that part. That's much more likely a javascript/ajax issue that trickles up to the core plugin itself, not just Community Addon.


  2. sj-xweb
    Posted 1 year ago #

    Hey, not sure if you guys are still looking for info on this issue, but we recently experienced the problem of achievement tab not displaying on member profile.

    After debugging the code a bit, I figured out that our problem was related to a mismatch of data.

    Specifically, it was on line 170 of badgeos-community-add-on/includes/bp-members.php:
    $post_id = isset( $arr_achievement_types[$achievement_type] ) ? $arr_achievement_types[$achievement_type] : 0;

    The short story is that $arr_achivement_types is populated with post_name as the array key, and $achievement_type is populated with post_type. Which worked, until someone updates the title of an Achievement Type (which was the case for us).

    Apparently post_name doesn't update when the title is changed, but any new achievements created using the new title will have the updated name as post_type. So from that point on, the code is trying use the new name to select from an array populated with old names

    After I updated the post_name field, the problem went away, and the achievement tab showed up again.

    I'm not sure if this is exactly the issue you're trying to resolve, and I hope it makes sense. Hopefully it will helps you with debugging the problem.

  3. Cartographer
    Posted 1 year ago #

    I still face this issue.

    Do you have an email in order to send you an email with my site to check it out?
    It is not "live" yet but it is online.


  4. EsportsEmpire
    Posted 1 year ago #

    Same issue here, i have it live you can se a profile here.

    if you need more details i can send you an email, it would be of huge help


  5. tstoute
    Posted 10 months ago #

    Hi there, this issue has been a persistent problem for me, and is preventing me from launching my company intranet site. I tried to follow the instructions provided by Michael; here's what I did:
    1. I confirmed that a user has an achievement as described.
    2. I checked BadgeOS > Achievements Types and only see one checkbox there (not two) called "Show in Menu". It is checked.
    I was not clear on how to check the database fields - specifically what is "_badgeos_show_bp_member_menu". The site is only accessible internally, but I have full access to the database and Linus server.

    Would love to resolve this issue, as I'm very keen to get this live.

    I'm using WordPress 4.1, BadgeOS 1.4.4, BuddyPress 2.1.1, and BuddyBoss theme 4.1.0.

  6. Michael Beckwith
    Plugin Author

    Posted 10 months ago #

    tstoute, do you have the Community Addon installed and activated as well? That's what's going to add the extra checkboxes that you can use.

  7. tstoute
    Posted 10 months ago #

    That was it... thank you! Once I added the BadgeOS Community Add-on the Achievements navigation appeared (and the second check-box appeared on the Achievements Types page too).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BadgeOS Community Add-on
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.