Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Critical
-
Resolution: Incomplete
-
Affects Version/s: 4.2.0
-
Fix Version/s: None
-
Component/s: WordPress Integration
-
Labels:None
Description
Civicrm unusable. Error in civicrm.php. Capabilties/Roles not getting applied. Users (including administrator) cannot update or add records. Database will allow edits/updates outside of civicrm.
Error indicated on following line
if ( is_array( $wp_roles->get_role( $role )->capabilities ) &&
Complete offending function as follows:
function wp_civicrm_capability( ){
global $wp_roles;
if ( ! isset( $wp_roles ) )
//access civicrm page menu link to particular roles
$roles = array( 'super admin', 'administrator', 'editor' );
foreach( $roles as $role ){
if ( is_array( $wp_roles->get_role( $role )->capabilities ) &&
! array_key_exists( 'access_civicrm_nav_link',
$wp_roles->get_role( $role )->capabilities ) )
}
}