ContextInstitute / bfcom

http://bfn.context.org
GNU General Public License v3.0
4 stars 1 forks source link

Problem with define() in bfc-functions.php ... and a fix #107

Open rgilman opened 5 years ago

rgilman commented 5 years ago

While using the console to better understand #106, I discovered that define('BP_DEFAULT_COMPONENT', 'profile' );on line 13 was throwing a "redefine" warning. I've moved define('BP_DEFAULT_COMPONENT', 'profile' ); into /wp-content/plugins/bp-custom.php – the recommended place since it loads earlier than bfc-functions.php – and all is well. I recommend you do the same.

Since bp-custom.php isn't in our repo, here's the code that I have in that file:

<?php
define('BP_DEFAULT_COMPONENT', 'profile' );
iangilman commented 5 years ago

I don't have a /wp-content/plugins/bp-custom.php... are you saying we should create one?

rgilman commented 5 years ago

Yes.

I suppose we could also put a copy of that file in the repo. What's the best way to handle that?

iangilman commented 5 years ago

Okay, I've now added that file. @DavidScottBernstein @wunluv Please do so as well and comment here once you've done so.

As for including it in the repository, I guess we'd have to have a repository that's the entire wp-content folder instead of just the themes/bfcom folder as we do now. That might be good anyway, to help us with other such changes.

DavidScottBernstein commented 5 years ago

Done. I did have a bp_custom.php file with just comments and nothing executable. But that file also contained the extra "?>" that I saw on my homepage and I think that was causing some of the updates to report errors. I removed the extra "?>" and "added define('BP_DEFAULT_COMPONENT', 'profile' );" This was on my local installation and not part of the repo.

rgilman commented 5 years ago

@DavidScottBernstein, good to hear you've likely solved the mystery of the extra ?>.

Adding this file and its contents feels simple enough to do manually. I'm thinking that we might wait on expanding the repo until we have additional reasons to do so. How does that sound to you all?

DavidScottBernstein commented 5 years ago

Fine with me.

iangilman commented 5 years ago

Works for me.