Skip to:
Content
Pages
Categories
Search
Top
Bottom

PHP Notice: bp_setup_current_user was called incorrectly

  • Profile photo of jreeve
    jreeve
    Participant

    @jreeve

    In my debug.log, I’m getting this error:

    [07-Aug-2014 20:16:29 UTC] PHP Notice: bp_setup_current_user was called <strong>incorrectly</strong>. The current user is being initialized without using $wp->init(). Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 1.7.) in /vagrant/app/public/wp-includes/functions.php on line 3245

    What is causing this, and how can I get it to stop complaining?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Profile photo of danbp
    danbp
    Moderator

    @danbp

    Hi @jreeve,

    something is wrong with the wp load order. Maybe a theme or a plugin issue.
    On which place you see this error ? Activate wp_debug in wp-config
    what theme do you use ?
    Plugins ?

    Profile photo of jreeve
    jreeve
    Participant

    @jreeve

    It’s definitely a theme or plugin issue. The error is in my debug.log. I already have wp_debug activated, which is how I can see these errors.

    I’m using a theme I wrote, based on the cbox-theme. Tons of plugins, but mostly those included in CBOX.

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    It can be difficult to track that one down.

    But it’s probably ok as is – it’s just a warning, not an error.

    For more info:
    Use var_dump(debug_backtrace()); to see how things were loaded.
    Then comb thru the dump to see which plugin is generating the notice.

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    @shanebp debug_backtrace() looks interesting, I’ll find that one useful!

    Profile photo of jreeve
    jreeve
    Participant

    @jreeve

    Thanks @shanebp. debug_backtrace() seems to be pretty helpful in that respect. It seems like the error is coming from cbox-theme. I’ll see if I can reproduce it on a clean install and if so, submit a bug report to them about it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Notice: bp_setup_current_user was called incorrectly’ is closed to new replies.
Skip to toolbar