Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter kbarnett

    (@kbarnett)

    Thanks, Marko, as stated I am aware it wouldn’t cache anything not on our server. But the good news is once I disabled minify in the actual Cloudflare dashboard on CF’s site it did show me the debug info. So that seems to have resolved the problem with debug and now I’m confident it’s actually working. Thank you for your help!

    Thread Starter kbarnett

    (@kbarnett)

    Hi, Marko, the site is https://westmontlibrary.org

    I have object cache, page cache, and browser cache enabled in W3TC. Minify is disabled in the main W3TC settings but enabled through the Cloudflare extension.

    After enabling the Cloudflare extension, it’s caching most things now (images and fonts on our server; we have some assets on our homepage pulled from elsewhere which I don’t expect to be cached), but I don’t understand why nothing shows up in debug mode? I guess I’ll leave it on for a bit so you can see yourself.

    This is consistent across the main site and two subsites.

    Thanks!

    Thread Starter kbarnett

    (@kbarnett)

    More info, which may or may not be helpful: I can get all member names for the achievement (users added by me AND self-registered) by running a custom query like thus:

    $testquery = new WP_Query( array (
    	'post_type' => 'submission',
    	'meta_query' => array(
    		array(
    			'key'     => '_badgeos_submission_achievement_id',
    			'value'   => '158',
    			'compare' => '=',
    		),
    	),
    	'posts_per_page' => -1,
    
    ) );

    Thread Starter kbarnett

    (@kbarnett)

    So is it a lost cause then? If there’s any other information I can provide, let me know.

    In case it helps, BadgeOS, BadgeOS Community AddOn, and BuddyPress are all activated on the subblog only, not network activated. (I also set that blog as the BuddyPress site ID per this page on the BP codex. I may also try the “Put profiles in the root” option to see if that helps.)

    Thread Starter kbarnett

    (@kbarnett)

    I’m getting completed markup for users which I’ve added manually to the WP site (it’s a sub-site of a WP multisite) but nothing for users registered from the sign up page (http://westmontlibrary.org/inventyoursummer/sign-up/) and successfully activated by email.

    Those users registered from the sign up page CAN earn achievements, and their achievements show up on both their Profile page and in the “My Achievements” widget.

    Also, users who are registered on other sites in the network CAN earn achievements, but they also do not show up in the “Users Who Have Earned This” list. I checked, and all the users have a Nickname associated with them.

    Here’s an example page:
    http://westmontlibrary.org/inventyoursummer/badge/wild-child/ The three users listed were manually added to the WP site by me from the dashboard. None of the other users who earned it show up.

    Thank you for your continued help.

    Thread Starter kbarnett

    (@kbarnett)

    To be specific, it appears to only show users which I specifically added to the WordPress site from the dashboard as an administrator. It does not list any users who registered through the BuddyPress integrated signup. Oof.

    Thread Starter kbarnett

    (@kbarnett)

    Though it only seems to be showing SOME users…

    Thread Starter kbarnett

    (@kbarnett)

    Yes, just like the quoted code above. πŸ™‚

    But I think I figured it out. I added this code to my functions.php:

    function kb_display_earners( $user_content, $user_id ) {
    	$user = new BP_Core_User( $user_id );
    	return '<li><a href="' .  $user->user_url . '">' . bp_core_get_user_displayname( $user_id ) . '</a></li>';
    }
    add_filter( 'badgeos_get_achievement_earners_list_user', 'kb_display_earners', 10, 2 );

    So I’m using bp_core_get_user_displayname( $user_id ) instead of the_author_meta( ‘nickname’ , $user->ID ), which seems to work.

    Thread Starter kbarnett

    (@kbarnett)

    Thanks for your quick response.

    Looking at the page source, the returned nicknames are ending up before the UL with class “badgeos-achievement-earners-list” in the DOM, which is where I would expect they’d land. Yet I clearly am just bumbling around here, so I am not surprised I got it wrong. (I’m completely serious, not sarcastic!)

    I did try to make a custom function and use add_filter in my functions.php file, cross-referencing the BadgeOS Action and Filter Hooks Guide with the core files and the WordPress codex… but it’s just not coming together for me. I think I will probably just omit the list of earners, since I am kind of lost.

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