• Resolved A2E

    (@a2e)


    Just installed the plugin, as soon as I try yo go into the plugin’s settings I get

    Fatal error: Call to a member function has_cap() on a non-object in /[deleted]/[deleted]/public_html/wp-content/plugins/wordpress-wiki/controllers/wiki_admin.php on line 41

Viewing 2 replies - 1 through 2 (of 2 total)
  • 你需要修改wordpress-wiki/controllers/wiki_admin.php 这个文件里面的function upgrade_check() 函数,将函数改成
    You need to fix the function upgrade_check() of wordpress-wiki/controllers/wiki_admin.php .The function should be this:

    function upgrade_check() {
    		if ( get_option( 'numberOfRevisions' ) != false ) {
    			return true;
    		} else {
    			$wiki = get_role('wiki_editor');
    			if ( $wiki != null) {
    				if ($wiki->has_cap('edit_posts') ) {
    					return true;
    				}
    			} else {
    				if ($wiki == null) {
    					add_role( 'wiki_editor', 'Wiki Editor', array('read' => true) );
    				}
    				return false;
    			}
    		}
    	}

    Plugin Author Matthew Gerring

    (@beatpanda)

    Very sorry for the inconvenience! This error is fixed in version 1.0.1 of the plugin which you can download from Github:

    WordPress Wiki Development version

    The new version will be in the WordPress plugin repo shortly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WordPress Wiki] Fatal Error on line 41 right after installation’ is closed to new replies.