Skip Navigation

Open

Reported for: WPML Multilingual CMS 4.7.0

Topic Tags: Bug

Overview of the issue

Some administrator users may find they cannot access the Translation dashboard at WPML > Translation Management, experiencing either a 404 error or seeing a message “Sorry, you cannot access this page”.

This can occur in WPML 4.7.0-4.7.2 where roles have been modified (e.g. via some plugin such as User Role Editor) and necessary WPML capabilities have been lost.

Workaround

The issue will be fixed in WPML 4.7.3. In the meantime you can use the following code snippet to restore the missing capability for admin users:

function add_wpml_manage_translations_cap() {
    $role = get_role('administrator');
    if ($role) {
        $role->add_cap('manage_translations');
    }
}
add_action('init', 'add_wpml_manage_translations_cap');

Add this to your theme’s functions.php or use a plugin such as Code Snippets.

2 Responses to “Admins cannot access WPML > Translation Management”

    • You can use a plugin like “Code Snippets” to manage extra code such as this, or add it to your theme’s functions.php file.

Leave a Reply

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>