Title: Attach button does not work
Last modified: July 8, 2022

---

# Attach button does not work

 *  [jesusp86](https://wordpress.org/support/users/jesusp86/)
 * (@jesusp86)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/attach-button-does-not-work/)
 * Hello, I have a problem, I want to use the plugin BuddyPress Docs but the button
   is not attaching the file, however in a local installation it works but not on
   a web server, could you help me or if someone had the same problem could you 
   give me a solution please, thanks in advance.

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

 *  Plugin Author [David Cavins](https://wordpress.org/support/users/dcavins/)
 * (@dcavins)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/attach-button-does-not-work/#post-15809721)
 * Hi, It’s possible that your host has disabled the WordPress heartbeat protocol(
   like at SiteGround, WP Engine and other hosts), or an “optimization” plugin has
   shut down heartbeat, which breaks BP Doc’s JavaScript code. You can read about
   that issue and try a code fix that is included here: [https://github.com/boonebgorges/buddypress-docs/issues/704](https://github.com/boonebgorges/buddypress-docs/issues/704)
 * If this is the issue and the code fix solves the problem or not, please let us
   know.
 * Thanks!
 *  Thread Starter [jesusp86](https://wordpress.org/support/users/jesusp86/)
 * (@jesusp86)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/attach-button-does-not-work/#post-15856831)
 * Hello, I come with the same problem with BP Doc, I had not been able to respond
   before because we were waiting for a response from Siteground, the server where
   we have hosted our website.
 * We applied the code solution that you passed and the problem still persists, 
   it does not allow to attach a document for both groups and users, we communicated
   with the service provider and they told us that there is an error in a JavaScript
   plugin, I will send a capture of the message that Siteground sent us to verify
   yourselves the error.
 * [https://prnt.sc/FDWywQRGrV1M](https://prnt.sc/FDWywQRGrV1M)
 *  Plugin Author [David Cavins](https://wordpress.org/support/users/dcavins/)
 * (@dcavins)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/attach-button-does-not-work/#post-15856922)
 * Ha, yes, so it is Siteground. Yep, the issue is BP Docs’ use of WP’s Heartbeat
   script, which Siteground dequeues globally.
 * Just to be sure, can you verify that your version of `buddypress-docs/includes/
   component.php` matches this snapshot of the file exactly? [https://github.com/boonebgorges/buddypress-docs/blob/ea09b22caaeb41d3c8276a43807d8cb6456349ef/includes/component.php](https://github.com/boonebgorges/buddypress-docs/blob/ea09b22caaeb41d3c8276a43807d8cb6456349ef/includes/component.php)
 * Thanks!
 *  Thread Starter [jesusp86](https://wordpress.org/support/users/jesusp86/)
 * (@jesusp86)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/attach-button-does-not-work/#post-15857031)
 * Yes, I just checked it and to be sure I copied the code and it is exactly the
   same but it still does not allow to attach documents.
 *  Plugin Author [David Cavins](https://wordpress.org/support/users/dcavins/)
 * (@dcavins)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/attach-button-does-not-work/#post-15857221)
 * Huh. Can you look at the page code and see if `bp-docs.js` and `heartbeat.js`
   are being included? These script tags looks something like:
 * `<script src="http://bpdocstest.local/wp-includes/js/heartbeat.js?ver=6.0.1" 
   id="heartbeat-js"></script>`
    `<script src="http://bpdocstest.local/wp-content/
   plugins/buddypress-docs/includes/js/bp-docs.js?ver=6.0.1" id="bp-docs-js-js">
   </script>`
 *  Thread Starter [jesusp86](https://wordpress.org/support/users/jesusp86/)
 * (@jesusp86)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/attach-button-does-not-work/#post-15857253)
 * You tell me that I should go to this directory? [https://prnt.sc/NQgDhgzTNMrR](https://prnt.sc/NQgDhgzTNMrR)
   however the heartbeat.js file is not included.
 *  Plugin Author [David Cavins](https://wordpress.org/support/users/dcavins/)
 * (@dcavins)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/attach-button-does-not-work/#post-15857640)
 * Hi,
 * I was asking, if, on your doc edit page, those assets were being included in 
   the source code of the page.
 * Thanks!
 *  Thread Starter [jesusp86](https://wordpress.org/support/users/jesusp86/)
 * (@jesusp86)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/attach-button-does-not-work/#post-15858026)
 * Hi, they were not there, I included them and the result is the same 🙁
 *  Thread Starter [jesusp86](https://wordpress.org/support/users/jesusp86/)
 * (@jesusp86)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/attach-button-does-not-work/#post-15860919)
 * Hi, what solution can you give me, I made the changes you mentioned and still
   the problem remains, does not open the window to choose a document and attach
   it in the groups and users, is it possible to make an update of the plugin and
   adapt it to siteground?
 *  Plugin Author [David Cavins](https://wordpress.org/support/users/dcavins/)
 * (@dcavins)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/attach-button-does-not-work/#post-15861028)
 * The changes suggested have worked for other users of hosts that disable the WP
   Heartbeat API. I’m not sure what to tell you if that doesn’t also work for Siteground.
   They have software engineers that specialize in WP (that are also familiar with
   Siteground’s inner customizations, which I am not); what do they think the answer
   should be?

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

The topic ‘Attach button does not work’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/buddypress-docs.svg)
 * [BuddyPress Docs](https://wordpress.org/plugins/buddypress-docs/)
 * [Support Threads](https://wordpress.org/support/plugin/buddypress-docs/)
 * [Active Topics](https://wordpress.org/support/plugin/buddypress-docs/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/buddypress-docs/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/buddypress-docs/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [David Cavins](https://wordpress.org/support/users/dcavins/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/attach-button-does-not-work/#post-15861028)
 * Status: not resolved