Open
Reported for: WPML Multilingual CMS 4.7.0
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.
hallo, in welche Datei muss der Code? Function vom Theme?
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.