Closed pixelshrink closed 2 years ago
Hi @pixelshrink - You're right, there's no reason why this dependency has to be there. There's already some logic in the JS to degrade gracefully if wp.heartbeat
is not there. The problem here is that the wp_register_script()
call for buddypress-docs made our JS dependent on 'heartbeat', and if these plugins disable heartbeat by suppressing the core script, then it causes the bp-docs-js script not to load at all. I've rearranged things in ea09b22 so that this no longer happens. Maybe you could give it a test to confirm.
Hi, thanks for this, sorry for the delay. I can confirm that this works both on the edit doc and add new doc pages.
Thank you for confirming!
It seems that this fix doesn't solve the issue on a Siteground-hosted site: https://wordpress.org/support/topic/attach-button-does-not-work/
Or maybe there's another conflict, though the base description of the issue sounds like a match: • works perfectly on localhost • blows up when site moved to Siteground
If you completely switch off Heartbeat API (to improve site performance) for the frontend using a plugin like Litespeed Cache or Heartbeat Control, the metadata boxes like Associated Group, Access, Categories etc won't display when editing a doc.
I realise many ajax functions are affected by switching off Heartbeat API, but it would be very helpful if this functionality would work independent of Heartbeat API being disabled.
WP version: 3.8.3 BP Docs version: 2.1.6