BuddyDev

Search

[Resolved] Is this a BuddyPress or BuddyDev Community theme issue

  • Participant
    Level: Enlightened
    Posts: 31
    Dale Reardon on #21111

    Hi,
    I am using the BuddyDev community theme on our site.
    I am also using WP Rocket for caching though there are other plugins that would also cause this issue.
    One issue with WordPress sites and server load for logged in users is caused by the WP heartbeat – essentially even if your users aren’t doing anything but have a site page open then your server checks in with their session every now and then to see if anything is happening – this frequency is determined by the heartbeat interval.

    So if your community has a lot of users on the site even if they aren’t submitting activity or bringing up new pages the server can still get overloaded.

    Because of this I used a feature in WP Rocket to turn off heartbeat but have had to turn it back on.

    On the BP activity page and the main landing page for a group there is an edit field where someone can enter a new post. When the edit field is blank / empty the submit button is not visible and it only appears once you enter text and tab out of the field. The problem is that when I turned off the heartbeat the submit button just didn’t appear. Turn back on the heartbeat and issue goes away.

    Is it possible to instead make the submit buttons appear via client side JS testing and hence not rely on the server?

    I’m not sure if this submit behavior is done through core BP or part of the community theme though.

    Thanks,
    Dale.

  • Keymaster
    (BuddyDev Team)
    Posts: 21859
    Brajesh Singh on #21117

    Hi Dale,
    Thank you for the question.

    This is a common issue and will be independent of the theme. I will post the reason and solution both.

    BuddyPress uses ‘heartbeat’ script as a dependency for loading the buddypress.js file(from theme/legacy pack).

    Most of the plugin remove heartbeat by de-registering ‘heartbeat’ dependency.

    Since the dependency is not met, the buddypress.js is not loaded and that has been causing the issue.

    You can resolve this by telling BuddyPress to not use heartbeat as a dependency by putting this code in bp-custom.php

    
    
    add_filter( 'bp_activity_do_heartbeat', '__return_false' );
    

    After that, clearing cache will make things work.

    Best regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved