Skip Navigation

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 topic contains 5 replies, has 2 voices.

Last updated by Nigel 1 year, 7 months ago.

Assisted by: Nigel.

Author Posts
September 1, 2022 at 1:37 pm #11971503

michalB-2

WordPress automatically signed me out and when I tried to login again IU got this error,
First I check the DB and saw my user didn't have the Administrator privileges
a:1:{s:13:"administrator";s:1:"1";}, it was something else with WPML value, after that I have checked with my client user and found out my user didn't had role.
Why this happen?

September 2, 2022 at 1:27 pm #11978107

Nigel
Supporter

Timezone: Europe/Madrid (GMT+02:00)

Hi there

You mean that you went to check wp_usermeta and the wp_capabilities key for your user and found that it was missing administrator?

It is true that during set up WPML adds capabilities for translators, so that the entry in wp_capabilities would typically look something like this (after unserializing):

Array
(
    [administrator] => 1
    [wpml_manage_translation_management] => 1
    [wpml_manage_languages] => 1
    [wpml_manage_theme_and_plugin_localization] => 1
    [wpml_manage_support] => 1
    [wpml_manage_woocommerce_multilingual] => 1
    [wpml_operate_woocommerce_multilingual] => 1
    [wpml_manage_media_translation] => 1
    [wpml_manage_navigation] => 1
    [wpml_manage_sticky_links] => 1
    [wpml_manage_string_translation] => 1
    [wpml_manage_translation_analytics] => 1
    [wpml_manage_wp_menus_sync] => 1
    [wpml_manage_taxonomy_translation] => 1
    [wpml_manage_troubleshooting] => 1
    [wpml_manage_translation_options] => 1
    [translate] => 1
)

But it wouldn't (shouldn't) strip existing capabilities, including the administrator role you user already had.

I haven't come across this before and I suspect it may be an isolated occurence (not necessarily caused by WPML).

Do you have any information about what you were doing immediately prior to being logged out of the site?

Perhaps we can try to find some steps to reproduce the issue.

September 4, 2022 at 6:37 am #11983455

michalB-2

I was just editing product on the regular editing and need to login again after WordPress logged me out after the time they define for automatic logged out as passed
I using Elementor and WooLentor - WooCommerce Elementor Addons + Builder.
All the capabilities was deleted for the user I was using

September 5, 2022 at 5:21 am #11986157

Nigel
Supporter

Timezone: Europe/Madrid (GMT+02:00)

OK, but I don't believe there is any WPML action while editing posts that could modify a role to strip its existing capabilities, and it's not clear from what you've written that it necessarily is WPML that is responsible for that.

Without some specific steps to replicate there is not much we can do here.

You could try installing an activity log plugin that keeps a track of every action taken on the site, in case it offers any clues as to the cause were it to ever happen again.

In which case you could open another ticket and mention that it has happened before.

September 5, 2022 at 6:48 am #11986397

michalB-2

I don't know about activity log plugin, can you recommend one?

September 5, 2022 at 7:09 am #11986533

Nigel
Supporter

Timezone: Europe/Madrid (GMT+02:00)

I was thinking of something like https://wordpress.org/plugins/wp-security-audit-log/, but there are several options available, you can check some of the alternatives at hidden link

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.