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

WP_DEBUG issues #1

Open
tobylewis opened this issue Mar 12, 2014 · 0 comments
Open

WP_DEBUG issues #1

tobylewis opened this issue Mar 12, 2014 · 0 comments

Comments

@tobylewis
Copy link

Hi David,

Excellent plugin, I don't understand why bbPress does not do this out of the box.

I always have WP_DEBUG = TRUE, cause I'm debugging my code, so have come across a few small problems. Basically these all cause notice/warning output which then causes "Cannot modify header information" which means the redirect after a post/page save does not work.

First bbppt_debug() outputs info both on save and on the ajax call which I don't want but I also don't want to turn off WP_DEBUG_DISPLAY universally so would be good if there was a separate constant (like "BBPPT_DEBUG_DISPLAY") to turn this on/off.

Second, in process_topic_option( ), $bbppt_options['copy_tags'] and $bbppt_options['copy_comments'] will be unknown indices if not checked (or not even in the form) on the save $_POST case and so these generate warnings. If wrapped in !empty( ) there are no warnings as you have done in other places.

Finally if the post/page is set not to use the forums for comments then the $topic_id var is never initialised and generates an unknown variable error when calling the action at the end of the method

do_action( 'bbppt_topic_associated', $post_ID, $topic_ID );

I've made these mods in my copy of the plugin. It looks like this hasn't had a new release for a while so I'm not asking for help or an urgent update. Just passing this on in the hope you can include the changes next time you edit the project.

Cheers
Toby

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

1 participant