Documentation » Known Issues & Workarounds
Contact Details Show [redacted] After Updating to 4.11
After updating to Groundhogg 4.11, some users see [redacted] in place of contact names, email addresses and phone numbers. Nothing has been deleted: the details are only hidden from the screen for people who don’t have the view_contact_pii capability. This article explains who is affected and how to give them access. For how the setting works, see Contact Personal Information Access.
What You Might See #
- Contact names, email addresses, phone numbers and addresses show
[redacted]in the contacts list and on the contact record. - Searching by personal details isn’t available, and exporting, importing and downloading contact files are refused.
- Contact IDs, tags, notes, activity and segments still work.
Why It Happens #
The 4.11 update gives view_contact_pii to every role that can view contacts, so that nothing changes until you take it away from someone. Three groups of people can miss out:
- The person who ran the update. On that one page load, they were treated as restricted. Reload the page and the details come back.
- A user who was given access to contacts directly, rather than through their role.
- A role created after the update, for example by an add-on or a role editor plugin, that can view contacts.
Only grant access to people who should see your contacts’ details. If someone was restricted on purpose, leave them as they are.
Give a User Access #
An administrator who can still see contact details can do this for one user at a time.
- Go to Users » All Users and click the user.
- Scroll down to the Access & Team card.
- Check Can see the personal information of contacts. next to Personal information.
- Click Update User.
If the only administrator is the one who is restricted, they can’t change their own setting from this card. Use one of the options below instead.
Give a Whole Role Access #
Add the view_contact_pii capability to the role in a role editor plugin such as Members or User Role Editor. Roles that Groundhogg creates already have it.
If you use WP-CLI, run this, replacing <role> with the role’s name:
wp cap add <role> view_contact_pii
Fix Everyone the Update Missed #
This snippet gives the capability to every role and user that can view contacts and has no setting for it yet. Anyone who was explicitly set to denied is left alone. Run it once, as a snippet in a plugin such as Code Snippets, then remove it.
add_action( 'init', function () {
foreach ( wp_roles()->role_objects as $role ) {
if ( $role->has_cap( 'view_contacts' ) && ! array_key_exists( 'view_contact_pii', $role->capabilities ) ) {
$role->add_cap( 'view_contact_pii' );
}
}
foreach ( get_users( [ 'capability' => 'view_contacts' ] ) as $user ) {
if ( ! array_key_exists( 'view_contact_pii', (array) $user->caps ) && ! $user->has_cap( 'view_contact_pii' ) ) {
$user->add_cap( 'view_contact_pii' );
}
}
} );
❗ If you removed the capability from a role or user, instead of setting it to denied, this snippet gives it back. Check who that applies to before you run it.
Run the 4.11 Update Again #
Go to Groundhogg » Tools » System, open Previous Updates, choose Groundhogg and click 4.11. On 4.11 this gives the capability to roles that are missing it, but not to individual users, and you’ll see [redacted] once on that page load. After you update to 4.11.1, running it again also covers individual users. It follows the same rule as the snippet, so the same warning applies.
What 4.11.1 Changes #
- The 4.11 update no longer restricts the person who runs it, and it also gives access to users who were given access to contacts directly.
- It doesn’t run again on a site that has already finished the 4.11 update, so a site that is affected now needs one of the fixes above.
- Roles that an add-on or plugin creates later don’t get the capability automatically. Give it to them with a role editor or the WP-CLI command above.