• Resolved ConnectCIC

    (@connectcic)


    Hi
    I think this plugin is amazing and have also purchased the Leaderboard Add-on. However on my current project, logged in users are unable to see which badges they have achieved and the ‘You have earned this achievement’ and the congratulations text are not showing. The earned user achievements widget seems to be working fine.

    The website is on a test site at the moment, hence I haven’t included a link.

    Any assistance you are able to offer would be greatly received.

    Many thanks in advance

    https://www.ads-software.com/plugins/badgeos/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    Are you familiar with browser js consoles? Curious if there’s maybe an ajax/js error going on for this. Other initial thoughts are possibly theme conflicts that have css hiding them, but I can’t verify at all because of the test site situation.

    Thread Starter ConnectCIC

    (@connectcic)

    Totally unfamiliar with browser js consoles. I have taken the site off maintenance mode to enable you to view it https://www.streetchampions.org/HOHPT/digital-badges/ I feared you would say it was a theme conflict.

    Any solution you are able to offer would be really appreciated. ??

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Could you create an account for me quick. Username/Pass doesn’t matter, but use [email protected] for the email. If needed, award me a quick achievement too.

    Thread Starter ConnectCIC

    (@connectcic)

    Done, username and password should have been emailed. Achievement awarded too.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Thanks. I looked things over, and I believe it’s an issue with how single.php is being handled. We go through a couple things and construct the markup for this, and then append it to the_content filter. It appears that you’re utilizing single.php conditionally for various things, but you’re not always using the_content() or apply_filters( 'the_content', $thing ). So, I’m placing my bets on the issue is coming through in one of the places that doesn’t use either of those.

    Let me know if that clears this up or not. If not, I can go poking a bit more.

    Thread Starter ConnectCIC

    (@connectcic)

    Hi Micheal, thanks for your efforts on this and your swift response. To be honest though, it is completely beyond my ability and I’m not sure how to proceed??

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Is this a theme that you inherited or is it one you’ve been modifying or someone else has been modifying yourselves?

    If you or someone else you know has been working on it, you just need to use apply_filters() on variables that you’ve assigned with get_the_content(). That last function doesn’t apply the filters itself, which is what will be needed for the “earned” status markup to be displayed.

    I don’t want to go tinkering with your theme files myself because I don’t know what all you have going on with them, but I would be able to point out where the edits should be. If I recall right, I wouldn’t be able to edit the theme files from Appearance > Editor anyway, the server doesn’t have the correct write permissions.

    Thread Starter ConnectCIC

    (@connectcic)

    Hi again
    We haven’t made any modifications ourselves to the theme. If you would be kind enough to point out what and where the edits should go I will try to get it sorted my end.
    Many thanks in advance Michael

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    as examples, this first one is from line 190-199. This is the part that I think may be getting used for the achievements.

    $new_content = do_shortcode(get_the_content());
    
    $new_content = str_replace('span3', 'span2', $new_content);
    $new_content = str_replace('span4', 'span3', $new_content);
    $new_content = str_replace('span6', 'span4', $new_content);
    $new_content = str_replace('span8', 'span5', $new_content);
    $new_content = str_replace('span9', 'span6', $new_content);
    $new_content = str_replace('span12', 'span8', $new_content);
    
    echo $new_content;

    From line 342-353

    $new_content = get_the_content();
    $new_content = apply_filters('the_content', $new_content);
    $new_content = str_replace(']]>', ']]>', $new_content);
    $new_content = str_replace('span3', 'span2', $new_content);
    $new_content = str_replace('span4', 'span3', $new_content);
    $new_content = str_replace('span6', 'span4', $new_content);
    $new_content = str_replace('span8', 'span5', $new_content);
    $new_content = str_replace('span9', 'span6', $new_content);
    $new_content = str_replace('span12', 'span9', $new_content);
    
    echo $new_content;

    The biggest difference in the second one that isn’t in the first one is $new_content = apply_filters('the_content', $new_content);

    Thread Starter ConnectCIC

    (@connectcic)

    Hi Michael
    Still a little confused and a little worried about completing the edit with such limited knowledge. The Editor write permissions have now been changed so if you would be so kind to apply the edit, I would be really grateful. Many thanks in advance

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    I went ahead and did it, but this was literally a copy paste of the 2nd line from the second code block, into the hole in the first code block

    $new_content = apply_filters( 'the_content', $new_content ); right after the line that has do_shortcode()

    You can see that it’s working on the membership achievement page.

    Thread Starter ConnectCIC

    (@connectcic)

    Thank you so much, I really appreciate the excellent support that has been given. ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Users unable to view achievements’ is closed to new replies.