• Resolved valentin6work

    (@valentin6work)


    After opening any editor, it gives an error:
    Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in wp-includes/capabilities.php on line 668

    Used:
    WP Version 5.5.1
    Version plugin MasterStudy LMS 2.4.1
    PHP 7.2.19

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support supportstylemix

    (@supportstylemix)

    Hello,

    The last version of this plugin is 2.4.3, it seems you should update the plugin and please deactivate other plugins before updating it since other plugins may injure MasterStudy. Let us know what editor you are using, sometimes there might be conflicts, as an example MasterStudy is not compatible with Divi builder.

    Sincerely

    It appears you are also not compatible with Oxygen Builder.

    I get the same problem even trying to access certain pages in WP-Admin

    possible quick fix

    Apparently this is happening because the file /wp-includes/pluggable which contains the function doesn't get loaded until after the plugins are loaded.
    
    Indeed it is. So wrap whichever thing you're doing in a function, and hook it onto the plugins_loaded or init hook. (see the wp-settings.php file)
    
    Example:
    
    add_action('init','do_stuff');
    function do_stuff(){
      $current_user = wp_get_current_user();
      // ...
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘MasterStudy LMS Fatal error when editing any content’ is closed to new replies.