This thread is resolved. Here is a description of the problem and solution.
Problem:
If you're working on translations in the ATE and click "Complete", sometimes the translations queue may still show the jobs as In Progress even though they are actually done.
Solution:
We have identified that this issue might be related to Varnish caching the API calls used during the ATE synchronization process. To resolve this, we recommend excluding the API URLs from Varnish caching. Specifically, you should exclude the endpoint used for ATE sync, such as
https://wpml-chainalysis.pantheonsite.io/wp-json/wpml/tm/v1/
and any URL that follows this pattern.
Please note that this solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket at WPML support forum for further assistance.
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: Exception
This topic contains 58 replies, has 2 voices.
Last updated by Lauren 2 months ago.
Assisted by: Lauren.
Author | Posts |
---|---|
May 2, 2023 at 2:59 pm #13571929 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
Okay, thanks for the update. I look forward to more information after further testing. |
May 2, 2023 at 9:28 pm #13574213 | |
Chainalysis |
Quick update: still prepping/refreshing our test environment, with tasks such as applying the latest plugin updates (e.g. ACF Pro bug fixes that just came out) and updating plugin language packs. I should have a status update in the morning. |
May 3, 2023 at 3:24 pm #13580221 | |
Chainalysis |
Hi Lauren! I was able to update the test env and copy it to Cloudways, and there's some good news: On Cloudways, I'm able to complete my test translations successfully. I've been trying with the /crypto-incident-response/ page, and when I make edits in the primary language, English, and then send to myself for translation, the status of the translation becomes "Complete" when I'm done on Cloudways. This is great! However, Cloudways has its own way of doing things, such as: * losing symlinks as part of the migration process, and therefore changing where the language directory ends up To try and control for this, I've set up a local copy of the site using "Lando", which enables me to avoid changes like the languages path change, while also making sure that I'm testing things on a different environment that's not hosted by Pantheon. Interestingly, I'm able to recreate the sync problem on my local copy of the site, which is a bit surprising, even with a stock theme and no plugins activated except for the core WPML plugin. So WPML sync seems to work on Cloudways, but not on Pantheon and not on my local copy of the site. So strange. I don't know all of the changes that Cloudways makes as part of its site copy/migration progress, but I'll try to document the ones that I do know about in more detail, and I'll try to recreate them on my local setup. That might help reveal which particular change got the sync problem to go away on Cloudways. If you have other ideas on how to troubleshoot, please do share, thank you. |
May 3, 2023 at 4:21 pm #13580881 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
You mentioned" therefore changing where the language directory ends up" - can you tell me more what you mean about this? What is the difference you are seeing on your live site language directory location versus the one on cloudways? Also, ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS - I assume you are adding this in wp-config with custom code. If you comment it out or remove it from your live site, and then cancel the in progress job and create a new one, does the issue still occur? |
May 8, 2023 at 1:36 pm #13606133 | |
Chainalysis |
Hi, FYI, quick update: I'm still testing and troubleshooting as a priority to see which environment-specific items might be part of this sync problem. As of Friday afternoon I narrowed it down to somehow being related to one or two "must use" plugins that Pantheon includes in their hosting. (It seems that the problem is not a Redis / object cache problem after all, nor is it caused directly by environmental variables such as memory limit or FS_METHOD, etc.) I'm hoping to have narrowed down the problem even further today, but the news so far is that there seems to be some new incompatibility between the ATE site synchronization and Pantheon's mu-plugin collection. This doesn't bode well, but we'll see what I discover as I dig deeper today. |
May 8, 2023 at 2:05 pm #13606441 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
Okay thanks, please keep me posted and let me know your findings. |
May 8, 2023 at 2:35 pm #13606659 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
Okay thanks, please keep me posted and let me know your findings. |
May 9, 2023 at 9:28 pm #13617653 | |
Chainalysis |
Hi, I've traced the problem back and found a conflict between WPML's "Site Moved or Copied - Action Required" prompt functionality, and Pantheon's default, must-use page cache plugin, found at this location: `wp-content/mu-plugins/pantheon-mu-plugin/inc/pantheon-page-cache.php` This is a Must-Use plugin provided by Pantheon, our hosting provider, so I can't remove it from production. But when I deactivate this page cache plugin on a test site, I'm able to save my "This is a copy of my original site" selection on the "Site Moved or Copied - Action Required" prompt, which in turn enables my translation jobs to sync correctly. If it helps, if I recreate this same setup but I ignore the "Site Moved or Copied - Action Required" prompt, my translation jobs fail to sync correctly. Also, when I successfully save an option at the "Site Moved or Copied - Action Required" prompt, and I edit one of the pages where the ATE sync has failed, I see this error on my test environments: `Notice: Undefined property: stdClass::$status_id in /app/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/class-wpml-tm-ate.php on line 57` This error only appears when editing pages where the ATE sync has failed. If I then successfully create new translations for the page through the ATE, that error goes away for the page that I have successfully translated. It looks like Pantheon's must-use page cache plugin hasn't changed in eons, so it seems that WPML's "Site Moved or Copied - Action Required" prompt is the change that caused the translation sync to malfunction on our Pantheon environments. If you'd like me to create a video walkthrough that demonstrates the exact behavior here, please let me know and I can do that. |
May 10, 2023 at 2:00 pm #13623407 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
This was what one of our developers suspected, that it is an issue with Pantheon caching. I have reported your findings to our developers to see where we can go from here. I'll update here once I have more information. |
May 10, 2023 at 2:34 pm #13623685 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
In order for our developers to further test, I have disabled the debug display, because I could not access the login page, on the Cloudways test site. However, when I did login, I noticed that the WPML user credentials are no longer allowing me admin access. Please change the permissions for the username WPML to admin and I will send the login credentials to our developers for further testing. Let me know once that has been done. Thank you. |
May 10, 2023 at 2:36 pm #13623697 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
One more question - since we may not be able to reproduce this outside of Pantheon, do you have a test site there that we can troubleshoot on? if so, I have marked the next reply as private so that you can share credentials. Thanks! |
May 12, 2023 at 8:36 pm #13639289 | |
Chainalysis |
Hi Lauren, I'm very sorry; I somehow didn't see your last two messages until I manually checked this support ticket now, to see whether I had missed something. And indeed I had. 🙁 You should have admin access again, with the same credentials as before. You can use the existing test site at hidden link, and make any changes that you wish. This is not our production website; it's just a copy, so make whatever changes you'd like! My only request is that you leave the SMTP plugin deactivated if feasible, so that our translation reviewers don't receive unintended notifications from this test site. Thank you! |
May 15, 2023 at 2:09 pm #13648709 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
Excellent thank you, I will have our devs test on that site and update here once I have more information. |
May 18, 2023 at 2:51 pm #13672823 | |
Lauren Supporter
Languages: English (English ) Timezone: America/New_York (GMT-05:00) |
So far, our developers are not able to reproduce the issue on the test site, I assume because the site has already been marked as copied or moved. Based on the current information available, they checked the mentioned MU plugin and prepared a solution to clear cache when site move and copy notice is saved. Please try adding this to theme functions.php /** * Clear cache after site move/copy ATE notice on Pantheon hosting. * @internal wpmlsupp-10712 */ add_action('wpml_tm_ate_synchronize_translators', function(){ if (get_option('otgs_wpml_tm_ate_cloned_site_lock')) { function_exists('pantheon_clear_edge_all') ? pantheon_clear_edge_all() : ''; wp_cache_flush(); } }); and let's check if you still see the issue. |
May 19, 2023 at 9:35 pm #13681515 | |
Chainalysis |
Hi Lauren, thank you for this. I added this new `wpml_tm_ate_synchronize_translators`-related function to the wpml-chainalysis test environment, and I'm still able to recreate the sync problem consistently. If you want to see the gory details, here's everything that I tested: I've left this new function in place on the "wpml-chainalysis" test environment at hidden link if you want to see the behavior for yourself. |