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.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| - | 9:00 – 14:00 | 9:00 – 14:00 | 9:00 – 14:00 | 9:00 – 14:00 | 9:00 – 14:00 | - |
| - | 19:00 – 22:00 | 19:00 – 22:00 | 19:00 – 22:00 | 19:00 – 22:00 | 19:00 – 22:00 | - |
Supporter timezone: Europe/Paris (GMT+01:00)
This topic contains 51 replies, has 3 voices.
Last updated by George Botsev 7 years, 4 months ago.
Assisted by: Yvette.
| Author | Posts |
|---|---|
| September 25, 2018 at 2:22 pm #2764239 | |
|
Václav |
Hello, The remaining issue is, that the translator doesn't see the assigned translation under his account. Thanks! |
| September 25, 2018 at 2:28 pm #2764251 | |
|
Václav |
This is probably due to this db error: [code] |
| September 25, 2018 at 7:51 pm #2765152 | |
|
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+01:00) |
Ok. I am asking if we should create a new ticket for the issue of if we can still work off of this one. Please be patient until I get a response. |
| September 25, 2018 at 8:34 pm #2765222 | |
|
Václav |
Hello Yvette, Thanks! |
| September 26, 2018 at 6:40 am #2766011 | |
|
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+01:00) |
I have the agreement of 2nd tier to continue with this ticket here. With regards to the translator not being able to see the jobs assigned to them: 1.Is this for new products? or only for old products? 4. Please provide steps to replicate this on your system (be detailed). Thanks |
| September 26, 2018 at 9:38 am #2766651 | |
|
Yvette Supporter
Languages: English (English ) Spanish (Español ) Timezone: Europe/Paris (GMT+01:00) |
Thanks - I´ve passed the information along. |
| September 27, 2018 at 8:43 am #2769824 | |
|
George Botsev WPML Supporter since 02/2014
Languages: English (English ) Timezone: Europe/Sofia (GMT+02:00) |
Hello, I am George from second tier support. So we need one of the two options here: Currently, based on the data that we have of the error and of the structure of your site, this looks to us like a conflict with your custom code - that fragments the multisite database into multiple databases. |
| September 27, 2018 at 10:56 am #2770215 | |
|
Václav |
Hello, Please, provide me your IP address, I'll add it to the list of allowed IP's to access the log and will provide you the information how to get to the error log. I use HyperDB in a pretty simple scenario, just to split the site's dbs after each 100 sites. Here's the function that takes care of that:
// Multisite blog tables are "{$base_prefix}{$blog_id}_*"
if ( preg_match("/^{$wpdb->base_prefix}(\d+)_/i", $wpdb->table,$matches) && strpos($wpdb->table, '_slim_') === false ) {
if (isset($matches[1])) {
$db_id = intval($matches[1] / 100);
if ($db_id) {
return 'yotlix_' . $db_id;
}
}
}
Let me know if you need anything else, I'll be happy to provide you more details. Thanks! |
| September 27, 2018 at 11:30 am #2770293 | |
|
George Botsev WPML Supporter since 02/2014
Languages: English (English ) Timezone: Europe/Sofia (GMT+02:00) |
Yes, I noticed that code, and that is exactly the source of the problem. My current IP address is: 188.254.152.213, but this can change as I have no static address. |
| September 27, 2018 at 11:40 am #2770340 | |
|
Václav |
Hello George, The error is this one:
[27-Sep-2018 11:39:19 UTC] WordPress database error Table 'yotlix_6.mw_users' doesn't exist for query SELECT DISTINCT
SUBSTRING_INDEX(ito.element_type, '_', 1) AS element_type_prefix,
ito.element_type AS original_post_type
FROM mw_625_icl_translate_job j
JOIN mw_625_icl_translation_status s
ON j.rid = s.rid
JOIN mw_625_icl_translations t
ON s.translation_id = t.translation_id
JOIN mw_625_icl_translate iclt
ON iclt.job_id = j.job_id
JOIN mw_625_icl_translations ito
ON ito.element_id = iclt.field_data
AND ito.trid = t.trid
JOIN (SELECT rid, MAX(job_id) job_id FROM mw_625_icl_translate_job GROUP BY rid ) jobmax
ON ( j.revision IS NULL
AND j.rid = jobmax.rid)
OR ( j.job_id = jobmax.job_id
AND j.translated = 1)
LEFT JOIN mw_625_posts p
ON t.element_id = p.ID
LEFT JOIN mw_users u
ON s.translator_id = u.ID
WHERE s.status > 0 AND s.status <> 9 AND (j.translator_id = 98 OR j.translator_id = 0 OR j.translator_id IS NULL ) AND s.translation_service='local' AND ( (t.source_language_code = 'cs' AND t.language_code IN ('en')) OR (t.source_language_code = 'en' AND t.language_code IN ('cs')) )
AND iclt.field_type = 'original_id'
made by WPML_Translation_Job_Factory::get_translation_job_types_filter
|
| September 27, 2018 at 11:45 am #2770360 | |
|
George Botsev WPML Supporter since 02/2014
Languages: English (English ) Timezone: Europe/Sofia (GMT+02:00) |
Thank you for your feedback. |
| September 27, 2018 at 11:49 am #2770364 | |
|
Václav |
Ok, I debugged this more and can see what the issue is, it's this code, where the joined users table obviously doesn't exist.
$job_types = $wpdb->get_results( "SELECT DISTINCT
SUBSTRING_INDEX(ito.element_type, '_', 1) AS element_type_prefix,
ito.element_type AS original_post_type
FROM " . $this->get_table_join() . "
LEFT JOIN {$wpdb->prefix}posts p
ON t.element_id = p.ID
LEFT JOIN {$wpdb->users} u
ON s.translator_id = u.ID
WHERE {$where}
AND iclt.field_type = 'original_id'
" );
Any chance to rewrite this to get the user details in another query? |
| September 27, 2018 at 11:59 am #2770409 | |
|
George Botsev WPML Supporter since 02/2014
Languages: English (English ) Timezone: Europe/Sofia (GMT+02:00) |
Yes, that is what I was trying to explain. |
| September 27, 2018 at 12:44 pm #2770487 | |
|
George Botsev WPML Supporter since 02/2014
Languages: English (English ) Timezone: Europe/Sofia (GMT+02:00) |
As I suspected, that information was not enough for our developers to diagnose the issue and to suggest a proper resolution. They are asking if it will be possible to have a staging machine where the issue is reproduced - for testing, or if it is fine to test on that machine where you have already provided access? They need full access - even best if SSH access is included. Please let me know if you can provide a staging environment (I am enabling the private reply) or if you agree for us to use the current environment for tests. Please do note that using the current environment for tests is a dangerous operation and may lead to corruption or loss of data.. |
| October 5, 2018 at 8:22 am #2789853 | |
|
George Botsev WPML Supporter since 02/2014
Languages: English (English ) Timezone: Europe/Sofia (GMT+02:00) |
Hello! They suggest two changes: So let me here provide you the exact changes that you can test.
if ( preg_match("/^{$wpdb->base_prefix}(\d+)_/i", $wpdb->table,$matches) && strpos($wpdb->table, '_slim_') === false ) {
to
if ( preg_match("/^{$wpdb->base_prefix}(\d+)_/i", $wpdb->table,$matches) && strpos($wpdb->table, '_slim_') === false && strpos($wpdb->table, '_users') === false ) {
And code change in our plugin code (might not be necessary):
LEFT JOIN {$wpdb->users} u
to
LEFT JOIN {$wpdb->prefix}users u
I see 3 instances in the WPML Translation Management plugin in the files: Please let me know how it goes. Please remember to create backups before you do anything. |