This thread is resolved. Here is a description of the problem and solution.
Problem: The client is unable to use the auto-translate feature. After adding items to the translation queue, the translation does not proceed, and the status remains as "Refreshing Translation Status". Solution: We recommend the following steps: 1. Back up your database to ensure that you can restore your site if necessary. 2. Delete the
wpml.ate_sync.lock
key from the
wp_options
table in your database. This action should resolve the issue with the stuck translation status.
Please note that this solution might be outdated or not applicable to your case. If the problem persists, we encourage you to check the related known issues and verify that you have the latest versions of themes and plugins installed. If you still need assistance, please open a new support ticket with us.
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.
I pushed it like you said and now it can translate automatically.
Thank you very much.
I am not sure what was the cause of the problem and I am worried that I will not be able to translate again.
Please let me know if there is any possible cause.
Also, I can now auto-translate, but the header display does not disappear.
Is this a different problem from the automatic translation?
The original site is no longer translating again.
I have not rewritten the code or anything, so the cause is unknown.
I've asked the client for permission and will give you the access information.
I would appreciate it if you could check the original site.
Thank you for your checking.
I tried registering a new key, but the translation did not work.
The client provided the following response to the first question.
-----------
There is no in-OS Firewall, but because it is an AWS EC2 server, there is a security group (rule that only restricted IPs can communicate).
*WordPress web ports (80/443) are not restricted, but there is Basic authentication.
By the way, do you want to communicate with a specific port?
If necessary, we will receive your IP and add rules.
Also, we do not have a CDN specifically set up here.
-----------
function wpbp_http_request_args($r, $url) {
// Define API domains where Auth should be added
$api_domains = ['api.example.com', 'secure.example2.com'];
// Check if the URL belongs to one of the defined API domains
foreach ($api_domains as $domain) {
if (strpos($url, $domain) !== false) {
// Securely fetch the username and password stored in wp-config.php or database
$username = defined('API_USERNAME') ? API_USERNAME : get_option('api_username');
$password = defined('API_PASSWORD') ? API_PASSWORD : get_option('api_password');
// Add the Authorization header
$r['headers']['Authorization'] = 'Basic ' . base64_encode($username . ':' . $password);
break;
}
}
return $r;
}
add_filter('http_request_args', 'wpbp_http_request_args', 10, 2);
Also, please add the following code in wp-config.php
I have added the code you gave me.
Only 'your_username' and 'your_password' need to be rewritten, right?
The translation still doesn't work, but the REST API seems to be working in the WPML support menu view.