Skip to:
Content

Opened 14 months ago

Closed 13 months ago

Last modified 4 weeks ago

#4830 closed defect (bug) (invalid)

bp_setup_current_user was called incorrectly

Reported by: mercime Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.7
Component: Core Keywords:
Cc: info@…

Description

BP 1.7 beta 1, WP 3.5.1, bbPress 2.2.3, WP_DEBUG is TRUE
BP Default theme

Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in /xxx/xxx/xxx/xxx.com/wp-includes/functions.php on line 2959

Attachments (1)

4830.01.patch (41 bytes) - added by r-a-y 13 months ago.

Download all attachments as: .zip

Change History (20)

comment:1 mercime14 months ago

Saw the references to the bp_setup_current_user
https://buddypress.trac.wordpress.org/changeset/6765
https://buddypress.trac.wordpress.org/changeset/6767

Didn't see this error when I was testing BP 1.7 trunk with bbPress trunk on WP 3.6 bleeding earlier this week on another installation.

Last edited 14 months ago by mercime (previous) (diff)

comment:2 DJPaul14 months ago

It's a recent addition (about a week ago) because of a obscure bug John tracked down.
Can you disable all other plugins other than BP, and see if the problem still exists? If it does, on what page does the error occur? Every page?

comment:3 johnjamesjacoby14 months ago

  • Milestone Awaiting Review deleted

Some plugin is invoking it too early (maybe even bbPress.) You'll want to do a debug_backtrace() and figure out what function is calling it when.

I put these checks in purposely to call out plugins that are doing it wrong, of which BuddyPress has been since 1.5.

comment:4 mercime14 months ago

Error appeared in the backend as well as in all front-end pages.

  • Deactivated all plugins.
  • Activated BuddyPress, no problem. Activated bbPress, warning shows up.
  • Deactivated both plugins.
  • Activated bbPress, no problem. Activated BuddyPress, warning shows up.
  • bbPress and BuddyPress together have issues.

comment:5 mercime14 months ago

I upgraded to bbPress 2.3 beta 1 and issue was fixed.

comment:6 boonebgorges14 months ago

  • Resolution set to invalid
  • Status changed from new to closed

comment:7 unsalkorkmaz14 months ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

I still see this error.
Fresh WP install -> trunk-6829 buddypress install -> /wp-admin/customize.php gives this error with default theme Twenty Twelve

comment:8 unsalkorkmaz14 months ago

  • Version set to 1.7

comment:9 unsalkorkmaz14 months ago

oh.. and its showing on frontend when both buddypress+bbpress is activated too

Last edited 14 months ago by unsalkorkmaz (previous) (diff)

comment:10 mercime13 months ago

Tested some themes live in WP Theme Repo. Out of 8 themes randomly tested so far, when Pagelines theme is activated, errors show up re bp_setup_current_user:

  • BuddyPress activated - Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 1.7.) in F:\xampp\htdocs\trunkbpwp\wp-includes\functions.php on line 2986
  • bbPress activated - Notice: bbp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 2.3.) in F:\xampp\htdocs\trunkbpwp\wp-includes\functions.php on line 2986
  • both BuddyPress and bbPress activated - both errors show up

Have posted the abve in Pagelines Support Forum in WordPress.org for info

Last edited 13 months ago by mercime (previous) (diff)

comment:11 wdfee13 months ago

  • Cc info@… added

I've this error with BP and bbP in my own theme, too, and didn't find out yet where I called something wrong.

comment:12 unsalkorkmaz13 months ago

If i remember correct, problem was querying posts before theme setup.
For example: http://themes.svn.wordpress.org/firmasite/1.1.4/functions/showcase.php
I move those queries "after_setup_theme" and problem was gone with trunk version of bbpress + buddypress.

comment:13 wdfee13 months ago

thanks @unsalkorkmaz this was a good advise. I put now all my require_once file calls of my functions.php inside of my theme setup and the errors are gone.

comment:14 wdfee13 months ago

checked my plugins now (after theme is clean), it also appears when Better WP Security plugin is active, have posted this on their support forum, too. http://wordpress.org/support/topic/php-notice-debug-with-buddypress-17-bbpress-23

comment:15 DJPaul13 months ago

  • Resolution set to invalid
  • Status changed from reopened to closed

This is a useful discussion, but closing the ticket as it's not a bug in BuddyPress. If folks get these warnings, then one of their plugins or theme needs some attention.

r-a-y13 months ago

comment:16 unsalkorkmaz8 months ago

I am still getting this error with even twentythirteen theme. I believe its BuddyPress itself

comment:17 wdfee8 months ago

@unsalkorkmaz what plugins do you have installed (active and inactive)?

comment:18 unsalkorkmaz8 months ago

0 plugin, 0 mu-plugin, twentythirteen theme and /wp-admin/customize.php still gives this error.

comment:19 Offereins4 weeks ago

For future reference, see #WP24169

Note: See TracTickets for help on using tickets.