Okay
  Print

Wiki menu disappeared in the backend

Important

This article is outdated. Woffice has a new documentation here: 

https://alkaweb.atlassian.net/wiki/spaces/WOF/overview

If anything is missing, let us know and we will improve it. It was designed to be searchable, more organized and more complete. 

------



Since version 1.9.0 it's possible to handle the wiki permissions using meta caps and plugins like User Role Editor (you can find more information about role assignation here).

Some customers are randomly experiencing an issue: The admin account is not able to see the wiki menu in the backend.

The administrators account should be ALWAYS able to do everything by default, in fact User Role Editor and other plugins don't allow to edit their caps.

If you are experiencing this issue you can open the file functions.php of your theme (parent or child doesn't matter), add this code at the end:

add_action('after_setup_theme', 'woffice_add_caps_to_admin');
function woffice_add_caps_to_admin(){
    //Assign caps to Administrator
    $role = get_role('administrator');
    $role->add_cap('woffice_read_wikies');
    $role->add_cap('woffice_edit_wikies');
    $role->add_cap('woffice_edit_others_wikies');
    $role->add_cap('woffice_edit_private_wikies');
    $role->add_cap('woffice_edit_published_wikies');
    $role->add_cap('woffice_delete_wikies');
    $role->add_cap('woffice_delete_others_wikies');
    $role->add_cap('woffice_delete_private_wikies');
    $role->add_cap('woffice_delete_published_wikies');
    $role->add_cap('woffice_publish_wikies');
    $role->add_cap('woffice_read_private_wikies');
}

Load a random page and now you should see again the wiki menu with admin. If it worked, remove the code added and all should continue to works well.

If you need more helps or something goes wrong, don't hesitate to send us a ticket.