Skip to:
Content

Opened 2 years ago

Closed 2 years ago

Last modified 12 months 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: 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 2 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 @mercime2 years 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 2 years ago by mercime (previous) (diff)

comment:2 @DJPaul2 years 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 @johnjamesjacoby2 years 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 @mercime2 years 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 @mercime2 years ago

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

comment:6 @boonebgorges2 years ago

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

comment:7 @unsalkorkmaz2 years 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 @unsalkorkmaz2 years ago

  • Version set to 1.7

comment:9 @unsalkorkmaz2 years ago

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

Last edited 2 years ago by unsalkorkmaz (previous) (diff)

comment:10 @mercime2 years 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 2 years ago by mercime (previous) (diff)

comment:11 @wdfee2 years 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 @unsalkorkmaz2 years 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 @wdfee2 years 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 @wdfee2 years 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 @DJPaul2 years 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-y2 years ago

comment:16 @unsalkorkmaz19 months ago

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

comment:17 @wdfee19 months ago

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

comment:18 @unsalkorkmaz19 months ago

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

comment:19 @Offereins12 months ago

For future reference, see #WP24169

Note: See TracTickets for help on using tickets.