Support » Plugin: BadgeOS Community Add-on » Badge OS earned user achievements widget

  • Resolved sassafrascal


    I am using badgeOS on a multisite which seems tobe functioning fine.

    But the user achievement widget does not show the images on my side bar… just the badge name with a space for the image.

    When testing the widget on one of the subdirectories I noticed it made the correct amount of lists but the lists are empty. No image or text.

    Does anyone know how to correct this?

Viewing 15 replies - 1 through 15 (of 33 total)
  • Do you have a link to the live site(s) that I could see quick? It’ll help me debug a little bit.

    Yes sure – and thanks for the quick response.

    Here is the main site with the widget on the side bar –

    Here is the subdirectory with the widget on the side bar –

    Since nothing shows if you’re not logged in and awarded badges I have added two links showing screenshots below of my logged in view of the BadgeOS widget with two badges to my name.

    Main Site Screenshot-

    Sub Site Screenshot-

    Not an immediate answer, but I’m checking the widget for earned achievements and I shouldn’t be seeing the outter < ul > from the output. I’m definitely not logged in, but it’s showing anyway. However, related to the issue, it’s not showing any < li > items which should be pulling the current logged in user’s achievements.
    Checking on some things, stand by

    I know I said standby, but I wanted to check if you managed to find a solution first. If not, then I’ll get back to trying to find a solution for this.

    If you did solve it, it’d be awesome if you shared how, if you know for sure.

    After looking a bit more closely at the widget code provided, it must be something with a broken image path, but I can’t confirm quite yet on your site. I’ll have to set up a MU instance on my own to give it a go there if I must.

    After messing with it a bit more I can see that it’s not “seeing” the badges from the other sites but it does make space for it. I agree there could be a broken image path but it’s odd that the text is gone as well and in the back end.

    I have two badges one on the main site and another on the subsite

    Main site – “New Member badge”
    Subsite – “Reviewer badge”

    Below is a pictogram, lol. that may shed more light.

    BTW – it seems that it shows the title for the badges even when not signed in, as you mentioned. When I take the title out of the widget it closes the space and does not show anything.

    The reason why the titles show up is because the widget wasn’t written to hide that part for non-logged in users.

    Are you familiar with view-source and your browser, and how to find this sidebar area in it? I’d like to see the logged-in output for the areas if you could.

    Another question, on these sites in the screenshots that are showing nothing. Are the missing badges from the MU site in question? or are they from a different site in the network?

    I’m starting to wonder if the issue is the Multisite and the widget not accommodating for the fact, thus it doesn’t have anything to display. With the backend missing images, it may not have the right url path for the image.

    If I’m right above, then we’ll want to get bugs filed on GitHub so we can get them taken care of.

    I would agree with the backend missing images if it were not also missing the text of the badge name.

    I don’t believe it’s a widget issue because the admin panel reflects the same error happening on the front end. If the main site admin area is not showing the subdirectory badge it shows as a blank spot on the front end… or if the subsite admin area is not showing the main site badge it shows as a blank spot on the subsite.

    I believe it is absolutely a multisite issue but I don’t understand why it registers on my subdirectory that my main site has a badge but will not show it and vice versa.

    I don’t know what you mean by a “different” site in the network.

    I have a Multisite Network as follows…
    > Main site of the network –
    >>/subdirectory of the network –

    Both are in the same network… Badge OS is recognizing them in the netwok – but they are just showing up blank for badges earned on separate sites within the network.

    I really appreciate that you are taking the time to help me with this… thank you!

    This is the code for the main site

    <div class="widget"><ul class="widget-achievements-listing"><li id="widget-achievements-listing-item-2441"  class="widget-achievements-listing-item has-thumb"><a style="margin-top: -0px;" class="badgeos-item-thumb" href=""><img class="wp-post-image" width="0" height="0" style="display:none;visibility:hidden;" data-cfsrc=""><noscript><img class="wp-post-image" width="0" height="0" src=""></noscript></a><a class="widget-badgeos-item-title widget-badgeos-item-title" href="">New Member Badge</a></li><li id="widget-achievements-listing-item-4360"  class="widget-achievements-listing-item"><a class="widget-badgeos-item-title widget-badgeos-item-title" href=""></a></li></ul><!-- widget-achievements-listing --></div>

    This is the code for the sub directory

    <div id="sidebar">
    <div class="widget"><h3><span>My Badges</span></h3><ul class="widget-achievements-listing"><li id="widget-achievements-listing-item-2441"  class="widget-achievements-listing-item"><a class="widget-badgeos-item-title widget-badgeos-item-title" href=""></a></li><li id="widget-achievements-listing-item-4360"  class="widget-achievements-listing-item has-thumb"><a style="margin-top: -25px;" class="badgeos-item-thumb" href=""><img class="wp-post-image" width="50" height="50" style="display:none;visibility:hidden;" data-cfsrc=""><noscript><img class="wp-post-image" width="50" height="50" src=""></noscript></a><a class="widget-badgeos-item-title widget-badgeos-item-title" href="">Reviewer</a></li></ul><!-- widget-achievements-listing --></div>

    Yes, you have the main site and when you were in the network admin, at, you added a 2ndary site in “/directory/”

    There is going to be a WP-Admin area for the main site at, and then there’s one for the “/directory/” site. That’s what I mean by different sites. For a user in question, were they awarded a badge in that they don’t see when at ? or vice versa?

    From you:
    “Both are in the same network… Badge OS is recognizing them in the netwok – but they are just showing up blank for badges earned on separate sites within the network.”

    Sounds exactly like what I said above.


    This part looks suspect though:

    <img class="wp-post-image" width="50" height="50" style="display:none;visibility:hidden;" data-cfsrc="">
    	<img class="wp-post-image" width="50" height="50" src="">

    I am not sure where the data-cfsrc attribute is coming from, nor the inline styles for display:none and visibility:hidden. I have scraped the source code for possible locations of that in output but haven’t found them. Do you know if those are somehow provided by a different plugin? I know the 2 inline styles would definitely play a key role in not showing them to people.

    As an aside, I filed an enhancement ticket on GitHub for network wide widgets for badge display. We’ll see if they make it into a future release, if indeed the widgets aren’t well suited for multiple sites in a network.

    I use cloudflare to speed up my network and it seems someone had this same suspicious code on their site that may be coming from Cloudflares image optimization… yet I do not see an answer for it on the forum.

    Hopefully GitHub Ticket can shed more light on the situation.

    I will pause cloudflare at some point today and see what happens.

    I turned off all image optimization with cloudflare then took a look at the source again – the suspect code is gone but the issue is still there.

    even the css parts are gone? because from everything i can tell, the img tags are showing up and not leading to dead end urls.

    Yes the CSS was gone as well.

    Do you happen to have a link to the Ticket you started on GitHub? Or know if there has been a response?

    Here’s the github ticket

    Like I said, it’s more feature request than fix for the issue. I’m still trying to figure that part out.

    I’ll reply with some more questions in a little bit.

Viewing 15 replies - 1 through 15 (of 33 total)
  • The topic ‘Badge OS earned user achievements widget’ is closed to new replies.