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.

Tagged: 

This topic contains 13 replies, has 4 voices.

Last updated by Noman 1 month, 3 weeks ago.

Assigned support staff: Noman.

Author Posts
July 10, 2019 at 5:39 pm #4183357

josephF-4

Hello,

I'm getting an error with class-wp-roles line 288 - and query monitor says it's coming from the wpml plugin. See image - any idea how to fix this error?

Thanks,
Joe

Error below:

do_action('plugins_loaded')
wp-settings.php:394
SitePress->plugin_localization()
wp-includes/class-wp-hook.php:286
load_plugin_textdomain()
wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php:3338
determine_locale()
wp-includes/l10n.php:786
get_user_locale()
wp-includes/l10n.php:134
wp_get_current_user()
wp-includes/l10n.php:92
_wp_get_current_user()
wp-includes/pluggable.php:69
apply_filters('determine_current_user')
wp-includes/user.php:2698
wp_validate_auth_cookie()
wp-includes/class-wp-hook.php:286
get_user_by()
wp-includes/pluggable.php:641
WP_User->init()
wp-includes/pluggable.php:106
WP_User->for_site()
wp-includes/class-wp-user.php:172
WP_User->get_role_caps()
wp-includes/class-wp-user.php:836
wp_roles()
wp-includes/class-wp-user.php:500
WP_Roles->__construct()
wp-includes/capabilities.php:748
WP_Roles->for_site()
wp-includes/class-wp-roles.php:90
WP_Roles->init_roles()
wp-includes/class-wp-roles.php:328
wp-includes/class-wp-roles.php:288

July 11, 2019 at 2:46 am #4185303

Dennis
Supporter

Languages: English (English )

Timezone: Asia/Manila (GMT+08:00)

Hi,

Welcome to WPML Support forum.

I noticed from your debug information that you're using outdated versions of WPML plugins. Please consider updating all WPML plugins to latest versions and check if the issue is resolved.

You can update WPML plugins at Plugins > Add new > Commercial tab.

Note: Please backup your site completely before updating WPML.

Please let me know how it goes.

Kind regards,
Dennis

July 11, 2019 at 2:31 pm #4190927

josephF-4

Hi,

I updated the plugins and the query warning still exists:

Notice Undefined index: capabilities 2
-
do_action('plugins_loaded')
wp-settings.php:394
SitePress->plugin_localization()
wp-includes/class-wp-hook.php:286
load_plugin_textdomain()
wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php:3338
determine_locale()
wp-includes/l10n.php:786
get_user_locale()
wp-includes/l10n.php:134
wp_get_current_user()
wp-includes/l10n.php:92
_wp_get_current_user()
wp-includes/pluggable.php:69
apply_filters('determine_current_user')
wp-includes/user.php:2698
wp_validate_auth_cookie()
wp-includes/class-wp-hook.php:286
get_user_by()
wp-includes/pluggable.php:641
WP_User->init()
wp-includes/pluggable.php:106
WP_User->for_site()
wp-includes/class-wp-user.php:172
WP_User->get_role_caps()
wp-includes/class-wp-user.php:836
wp_roles()
wp-includes/class-wp-user.php:500
WP_Roles->__construct()
wp-includes/capabilities.php:748
WP_Roles->for_site()
wp-includes/class-wp-roles.php:90
WP_Roles->init_roles()
wp-includes/class-wp-roles.php:328
wp-includes/class-wp-roles.php:288
Plugin: sitepress-multilingual-cms

July 12, 2019 at 7:06 am #4195703

Dennis
Supporter

Languages: English (English )

Timezone: Asia/Manila (GMT+08:00)

Hi,

Thank you for your reply.

Could you please check if this issue appears when:

-You deactivate all non-WPML plugins, except the plugins required to debug.
- Theme is set to a WordPress default like Twenty Sixteen. Its will tell us if there is an interaction issue with your theme.
- If the problem disappears, start activating one at the time to track where the incompatibility is produced.

Note: Please backup your site completely before doing this test.

If the issue still persists after deactivating all non-WPML plugins and temporarily switching to WP default themes, I would like to request for temporary access to your site.

Maybe I'll need to replicate your site locally to continue debugging and escalate if necessary. For this I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Please confirm if this okay with you.

I will enable the access information box so you could share to us the (ftp/wp-admin) access credentials securely.

Note: Please backup your site completely before giving us temporary access.

Privacy and Security Policy
We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Kind regards,
Dennis

July 22, 2019 at 6:58 pm #4260879

josephF-4

Hi,

WPML on query monitor throws these errors:

Query Caller Time
SELECT DISTINCT s.id, s.name, s.context, st.status, s.gettext_context, st.value AS tra, st.mo_string AS mo_string, s.value AS orig
FROM qh_icl_string_pages sp
INNER JOIN qh_icl_string_urls su
ON su.id = sp.url_id
INNER JOIN qh_icl_strings s
ON s.id = sp.string_id
LEFT JOIN qh_icl_string_translations st
ON s.id=st.string_id
AND st.language=su.language
AND s.language!=su.language
WHERE (su.language='fr' and su.url='(.?.+?)(?:/([0-9]+))?/?$')
+
WPML_ST_Page_Translations_Persist->get_translations_for_page
0,2448
SELECT s.id, st.status, s.domain_name_context_md5 AS ctx , st.value AS translated, st.mo_string AS mo_string, s.value AS original, s.gettext_context
FROM qh_icl_strings s
LEFT JOIN qh_icl_string_translations st
ON s.id=st.string_id
AND st.language='fr'
AND s.language!='fr'
WHERE s.context = 'default'
LIMIT 1000 OFFSET 3000
+
WPML_DB_Chunk->retrieve
0,0577
SELECT s.id, st.status, s.domain_name_context_md5 AS ctx , st.value AS translated, st.mo_string AS mo_string, s.value AS original, s.gettext_context
FROM qh_icl_strings s
LEFT JOIN qh_icl_string_translations st
ON s.id=st.string_id
AND st.language='fr'
AND s.language!='fr'
WHERE s.context = 'default'
LIMIT 1000 OFFSET 4000
+
WPML_DB_Chunk->retrieve
0,0600
SELECT s.id, st.status, s.domain_name_context_md5 AS ctx , st.value AS translated, st.mo_string AS mo_string, s.value AS original, s.gettext_context
FROM qh_icl_strings s
LEFT JOIN qh_icl_string_translations st
ON s.id=st.string_id
AND st.language='fr'
AND s.language!='fr'
WHERE s.context = 'default'
LIMIT 1000 OFFSET 5000
+
WPML_DB_Chunk->retrieve
0,0829
SELECT s.id, st.status, s.domain_name_context_md5 AS ctx , st.value AS translated, st.mo_string AS mo_string, s.value AS original, s.gettext_context
FROM qh_icl_strings s
LEFT JOIN qh_icl_string_translations st
ON s.id=st.string_id
AND st.language='fr'
AND s.language!='fr'
WHERE s.context = 'default'
LIMIT 1000 OFFSET 6000
+
WPML_DB_Chunk->retrieve
0,0862
SELECT s.id, st.status, s.domain_name_context_md5 AS ctx , st.value AS translated, st.mo_string AS mo_string, s.value AS original, s.gettext_context
FROM qh_icl_strings s
LEFT JOIN qh_icl_string_translations st
ON s.id=st.string_id
AND st.language='fr'
AND s.language!='fr'
WHERE s.context = 'default'
LIMIT 1000 OFFSET 7000
+
WPML_DB_Chunk->retrieve
0,1041

When trying to load a jobs page on the admin dash i get this error in query monitor:

Query Caller Time
SELECT trid, SUM(CASE language_code
WHEN 'zh-hans'
THEN 1
ELSE 0 END) AS `zh-hans`,SUM(CASE language_code
WHEN 'cs'
THEN 1
ELSE 0 END) AS `cs`,SUM(CASE language_code
WHEN 'en'
THEN 1
ELSE 0 END) AS `en`,SUM(CASE language_code
WHEN 'fr'
THEN 1
ELSE 0 END) AS `fr`,SUM(CASE language_code
WHEN 'de'
THEN 1
ELSE 0 END) AS `de`,SUM(CASE language_code
WHEN 'hi'
THEN 1
ELSE 0 END) AS `hi`,SUM(CASE language_code
WHEN 'it'
THEN 1
ELSE 0 END) AS `it`,SUM(CASE language_code
WHEN 'ja'
THEN 1
ELSE 0 END) AS `ja`,SUM(CASE language_code
WHEN 'mx'
THEN 1
ELSE 0 END) AS `mx`,SUM(CASE language_code
WHEN 'pl'
THEN 1
ELSE 0 END) AS `pl`,SUM(CASE language_code
WHEN 'pt-br'
THEN 1
ELSE 0 END) AS `pt-br`,SUM(CASE language_code
WHEN 'ru'
THEN 1
ELSE 0 END) AS `ru`,SUM(CASE language_code
WHEN 'es'
THEN 1
ELSE 0 END) AS `es`,SUM(CASE language_code
WHEN 'sv'
THEN 1
ELSE 0 END) AS `sv`,SUM(CASE language_code
WHEN 'th'
THEN 1
ELSE 0 END) AS `th`,SUM(CASE language_code
WHEN 'tr'
THEN 1
ELSE 0 END) AS `tr`,SUM(CASE language_code
WHEN 'gb'
THEN 1
ELSE 0 END) AS `gb`
FROM qh_icl_translations
WHERE element_type = 'post_job_listing'
GROUP BY trid
HAVING `en`= 0
ORDER BY trid;
-
WPML_Meta_Boxes_Post_Edit_HTML->connect_translations
WPML_Meta_Boxes_Post_Edit_HTML->render_languages
SitePress->meta_box
do_meta_boxes
the_block_editor_meta_boxes
include('wp-admin/edit-form-blocks.php')
SitePress->get_orphan_translations
0.0551
SELECT DISTINCT qh_posts.*
FROM qh_posts
LEFT JOIN qh_term_relationships
ON (qh_posts.ID = qh_term_relationships.object_id) JOIN qh_icl_translations wpml_translations
ON qh_posts.ID = wpml_translations.element_id
AND wpml_translations.element_type = CONCAT('post_', qh_posts.post_type)
WHERE 1=1
AND ( qh_term_relationships.term_taxonomy_id IN (6) )
AND qh_posts.post_type = 'fusion_element'
AND ((qh_posts.post_status = 'publish'))
AND ( ( ( wpml_translations.language_code = 'en'
OR 0 )
AND qh_posts.post_type IN ('post','page','attachment','wp_block','job_listing','company','search-filter-widget','tribe_venue','tribe_organizer','tribe_events','dlm_download','avada_portfolio','avada_faq','slide','job_application','fusion_element' ) )
OR qh_posts.post_type NOT IN ('post','page','attachment','wp_block','job_listing','company','search-filter-widget','tribe_venue','tribe_organizer','tribe_events','dlm_download','avada_portfolio','avada_faq','slide','job_application','fusion_element' ) )
GROUP BY qh_posts.ID
ORDER BY qh_posts.post_date DESC
-
WP_Query->query
WP_Query->__construct
fusion_cached_query
fusion_builder_display_library_content
include('/plugins/fusion-builder/inc/templates/app.php')
fusion_pagebuilder_meta_box
do_meta_boxes
the_block_editor_meta_boxes
include('wp-admin/edit-form-blocks.php')
WP_Query->get_posts
0.4361
SELECT DISTINCT meta_key
FROM qh_postmeta
WHERE meta_key NOT BETWEEN '_'
AND '_z'
HAVING meta_key NOT LIKE '\\_%'
ORDER BY meta_key
LIMIT 30
-
post_custom_meta_box
do_meta_boxes
the_block_editor_meta_boxes
include('wp-admin/edit-form-blocks.php')
meta_form
3.09

I follow your instructions for wp-config and did the issue again... nothing goes into the debug.og file in /wp-content/ unless I did something wrong. Feel free to give it a shot.

Thanks!

July 23, 2019 at 8:42 am #4264083

Dennis
Supporter

Languages: English (English )

Timezone: Asia/Manila (GMT+08:00)

Hi,

Thank you for your reply.

It's strange that php error(s) aren't recorded to debug.log file upon enabling wp debugging.

For us to debug the issue further, It would be great if we can migrate your site to our test server like I suggested on my previous reply here:

https://wpml.org/forums/topic/wp-roles-288-error/#post-4216499

Please let us know once migration is finished so we can continue debugging the issue.

Kind regards,
Dennis

July 25, 2019 at 10:51 pm #4286223

josephF-4

Hi, ok i installed the plugin and migrated. Also, we've been having an issue with wpml and wp-jobs-manager --> the jobs aren't appearing in translated categories on the foreign language pages -- if you go to the Careers page on a foreign language page and click a category in the the job function dropdown, no jobs appear, yet the categories are translations of the english version of the categories. Thanks!

July 26, 2019 at 10:49 am #4289243

Dennis
Supporter

Languages: English (English )

Timezone: Asia/Manila (GMT+08:00)

Hi,

Thank you for your reply.

I will consult our specialists about this issue for further investigation as the issue still exists after the preliminary debugging procedures.

I will update you here as soon as I got some feedback from them.

Kind regards,
Dennis

July 31, 2019 at 7:17 pm #4317351

josephF-4

How's it going? Thanks!

August 6, 2019 at 9:57 am #4346041

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Joe,

Dennis is no longer working with us now and I am going to take over this ticket and try my best to help you out. We really apologize for delay during this time. I will get back to you today.

Thank you for your cooperation and patience.

August 6, 2019 at 5:15 pm #4349705

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I have gone through the details of this ticket and below are my findings so far:

1. I tried to reproduce the issue on a fresh WP installation but I cannot see any such errors using Query Monitor and WPML.

2. Dennis escalated the ticket already to our 2nd tier and below is their reply -- I am sharing this for your info at the moment:
“ That issue is not related to WPML.
It seems that probably the WordPress is corrupt in regards to the capabilities of the users. ”

3. Have you checked theme and plugins conflict by disabling all other plugins and switching to a default theme (e.g. Twenty Nineteen theme)?

If we get the above details and any special steps to reproduce the issue, we may try to debug the issue further. But for now it seems its not directly related to WPML.

Thanks

August 12, 2019 at 8:58 pm #4383633

josephF-4

Strange, then why do all of the errors begin with WPML? Thanks, Joe

August 13, 2019 at 3:26 pm #4389215

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Itamar here from WPML support. I just want to inform you that Noman is on vacation and will be able to respond here next week. Since he has already checked this issue, it would be better that he will continue to handle this ticket.

I've read this ticket and our internal documentation about this issue.
One thing that I think would be helpful for us to know is, what is the actual issue that you have besides the error that you can see in the Query Monitor plugin?
Please note that it is known to us that this plugin sometimes gives wrong results concerning WPML.

Best Regards,
Itamar.

August 18, 2019 at 8:10 am #4411735

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello,

I hope you have read the info provided by Itamar in last reply.

Why do all of the errors begin with WPML?
-- Sometimes there are other factors or WP itself generates some errors due to some corrupt data and that cause other plugins to have issues when the plugins try to use those functions. And in these cases errors are not shown unless a plugin uses those functions. That's why we cant see it earlier.

So if all is working fine regardless of those errors shown in query monitor, we can skip those as false-positive. OR you may create a fresh WP site and move all your content there.

That's the best I can think for now. Thanks

The topic ‘[Closed] wp-roles 288 error’ is closed to new replies.