WordPress.org

Ready to get started?Download WordPress

Forums

Maintenance
[resolved] Breaks Ajax Pages (3 posts)

  1. kingjeffrey
    Member
    Posted 1 year ago #

    This may seem like an obscure issue, but it keeps me from using your otherwise beautiful plugin.

    I have a php document in a custom theme that is used to handle ajax requests. As is typical for such files, in order to have access to WordPress functions, I start the file with:

    define('WP_USE_THEMES', FALSE);
    	require($_SERVER['DOCUMENT_ROOT'] . '/wp-blog-header.php');

    When your pluggin is enabled, this breaks and I get the error:

    Fatal error: Call to undefined function get_userdata() in [...]/wp-includes/user.php on line 1402

    This occurs because when your plugin is loaded in wp-settings.php line 198, you call the get_userdata() function. But the get_userdata() function is not defined until wp-includes/pluggable.php is included on line 202 of wp-settings.

    http://wordpress.org/extend/plugins/maintenance/

  2. kingjeffrey
    Member
    Posted 1 year ago #

    In case this is a bug in the core of WordPress, I filed a ticket here: http://core.trac.wordpress.org/ticket/21612

  3. Fruitful Code
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry can't fix this issue

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.