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

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

Open
rgilman opened this issue Jan 2, 2019 · 7 comments
Open

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

rgilman opened this issue Jan 2, 2019 · 7 comments
Assignees

Comments

@rgilman
Copy link
Member

rgilman commented Jan 2, 2019

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' );

contextinst added a commit that referenced this issue Jan 2, 2019
and move it to bp-custom.php. See #107
@iangilman
Copy link
Member

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

@rgilman
Copy link
Member Author

rgilman commented Jan 2, 2019

Yes.

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

@iangilman
Copy link
Member

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
Copy link
Collaborator

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
Copy link
Member Author

rgilman commented Jan 3, 2019

@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
Copy link
Collaborator

Fine with me.

@iangilman
Copy link
Member

Works for me.

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

No branches or pull requests

4 participants