This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem:user capabilities lost?

Solution:To fix this, I suggest you run the following snippet:

function wpmlsupp_1706_reset_wpml_capabilities() { if ( function_exists( 'icl_enable_capabilities' ) ) { icl_enable_capabilities(); } } add_action( 'shutdown', 'wpmlsupp_1706_reset_wpml_capabilities' );

Just add the above code in your theme's functions.php file (between the tags)

and visit once the front-page.

Then you can remove this snippet.

Relevant Documentation:

This topic contains 2 replies, has 2 voices.

Last updated by sharonR 1 year, 4 months ago.

Assigned support staff: Bobby.

Author Posts
May 17, 2018 at 12:44 pm #2175551

sharonR

Hello

I changed my administration user. Created a new (admin role) user and when deleting the old one, moved all its content and data to the newly created one.
In the wp admin dashboard, when entering the new user's page, I no longer see the list of capabilities that belonged to the former one.

Is that a problem?
If so, what should I do in order for the new (admin level) user to obtain all needed capabilities?

Thanks,
Sharon

May 18, 2018 at 8:59 pm #2191927

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

Under the new admin are you able to access the WPML options, create a new page, delete it, add a transaltion ,etc ?

if yes then i believe you should not experience any issues.

Usually when the capabilities are lost a user might get a notice saying something like
"sorry you are not allowed access to this page"

To fix this, I suggest you run the following snippet:

function wpmlsupp_1706_reset_wpml_capabilities() {
if ( function_exists( 'icl_enable_capabilities' ) ) {
icl_enable_capabilities();
}
}
add_action( 'shutdown', 'wpmlsupp_1706_reset_wpml_capabilities' );

Just add the above code in your theme's functions.php file (between the <!--?php and ?--> tags)

and visit once the front-page.

Then you can remove this snippet.

May 20, 2018 at 2:31 pm #2197067

sharonR

Thanks. All capabilities were restored with this snippet.