Skip to content

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

Open
r-a-y wants to merge 1 commit intomasterfrom
bp-docs-fatal
Open

Fix fatal error when accessing the WP Edit Post interface and when BP Docs is active#279
r-a-y wants to merge 1 commit intomasterfrom
bp-docs-fatal

Conversation

@r-a-y
Copy link
Copy Markdown
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.

@r-a-y r-a-y requested a review from boonebgorges October 31, 2018 07:40
@boonebgorges
Copy link
Copy Markdown
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