[wp-trac] [WordPress Trac] #24169: WP_Customize_Manager loads the current user too early
WordPress Trac
noreply at wordpress.org
Tue Jun 24 23:12:21 UTC 2014
#24169: WP_Customize_Manager loads the current user too early
-----------------------------+-----------------------------
Reporter: johnjamesjacoby | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Customize | Version: 3.4
Severity: major | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+-----------------------------
Comment (by grundyoso):
I've been trying to resolve an issue that I traced down to being related
to this one. It exhibited itself in debug_log like this:
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.)
Through some stack tracing and variable duping, I tracked the issue down
to the WooDojo plugin. This plugin in particular loads bundles of custom
widgets and they don't seem to protect against the infamous
"after_setup_theme" state before trying to access the current user. So it
exhibits itself as a BBPress plugin issue when in fact WooDojo is making
the mistake of making sure the theme is setup before trying to mess with
the current user. At any rate, it was a simple fix in line 122 of the
./plugins/woodojo/classes/base.class.php file from this:
add_action( 'plugins_loaded', array( &$this, 'init_component_loaders' ) );
to this:
add_action( 'after_setup_theme', array( &$this, 'init_component_loaders' )
);
I'm somewhat of a nooB, so take this with a grain of salt... just hope it
helps save someone some time.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/24169#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list