• Resolved dominojuno

    (@dominojuno)


    Hi,
    I got a site crash due to what looks like an incompatibility between mdocs and another plugin neoweb_osm_authenticator (its a plugin to connect to a scouts database).

    The error and stack trace I’m seeing when activating the plugin with debug on is below. It looks like the neoweb plugin is calling get_posts during activation and this is triggering a filter added in mdocs_functions.php which uses the is_user_logged_in function which is a pluggable function and therefore loaded after the plugin logic is called.
    I’m not sure which plugin has broken the rules but I was able to fix by registering the filters in an init function. Are these filters being registered too soon?

    Fatal error: Uncaught Error: Call to undefined function is_user_logged_in() in /home/thcamberwellscou/public_html/wp-content/plugins/memphis-documents-library/includes/mdocs-functions.php:890 Stack trace: #0 /home/thcamberwellscou/public_html/wp-includes/class-wp-hook.php(288): mdocs_hide_attachments(‘ AND wp1c_posts…’) #1 /home/thcamberwellscou/public_html/wp-includes/plugin.php(244): WP_Hook->apply_filters(‘ AND wp1c_posts…’, Array) #2 /home/thcamberwellscou/public_html/wp-includes/class-wp-query.php(2376): apply_filters_ref_array(‘posts_where’, Array) #3 /home/thcamberwellscou/public_html/wp-includes/class-wp-query.php(3230): WP_Query->get_posts() #4 /home/thcamberwellscou/public_html/wp-includes/post.php(1836): WP_Query->query(Array) #5 /home/thcamberwellscou/public_html/wp-content/plugins/neoweb-osm-authenticator/inc/includes/api/api-field.php(1212): get_posts(Array) #6 /home/thcamberwellscou/public_html/wp-content/plugins/neoweb-osm-authenticator/inc/includes/api/api-field.php(1050): acf_get_field_id(‘field_5a34 in /home/thcamberwellscou/public_html/wp-content/plugins/memphis-documents-library/includes/mdocs-functions.php on line 890

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Call to undefined function is_user_logged_in()’ is closed to new replies.