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
If this is the issue and the code fix solves the problem or not, please let us know.
Thanks!
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
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
Thanks!
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.
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>
You tell me that I should go to this directory? https://prnt.sc/NQgDhgzTNMrR however the heartbeat.js file is not included.
Hi,
I was asking, if, on your doc edit page, those assets were being included in the source code of the page.
Thanks!
Hi, they were not there, I included them and the result is the same 🙁
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?
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?