Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fatal error when accessing the WP Edit Post interface and when BP Docs is active #279

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

r-a-y
Copy link
Member

@r-a-y r-a-y commented Oct 31, 2018

Hi @boonebgorges,

I'm on a bug spree it seems. Came across another one:

PHP Fatal error:  Call to undefined function bp_docs_is_doc_edit() in \wp-content\themes\openlab-theme\lib\plugin-mods\docs-funcs.php on line 13

This occurs if BuddyPress Docs is active and when editing any post in the WP admin dashboard. When I looked at the docs-funcs.php file, it appears all the mods there are only applicable to the frontend. So this PR only loads up docs-funcs.php if we're not in the admin area.

I haven't actually tested if this breaks things for BP Docs integration yet, but I think it shouldn't.

@boonebgorges
Copy link
Member

Hi @r-a-y - This sounds like a serious problem that would need a very quick 1.1.1 of commons-in-a-box.

But I can't seem to reproduce it. The function bp_docs_is_doc_edit() is always loaded as long as BuddyPress Docs is active, whether in the Dashboard or not.

Can you give a full stack trace of the fatal error? I assume it's in the function openlab_disable_wplink_for_docs()? Could it be that this is a load-order problem? Is tiny_mce_plugins being fired very early for some reason?

I don't have a particular problem loading these functions only on the front end, as you've suggested, but I would like to understand the issue first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants