Skip to content Skip to sidebar

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
10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 - -
16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 - -

Supporter timezone: Asia/Jerusalem (GMT+03:00)

Tagged: 

This topic contains 9 replies, has 0 voices.

Last updated by ehaitech-marketing-consultant- 3 days, 7 hours ago.

Assisted by: Itamar.

Author Posts
September 27, 2025 at 2:14 pm #17438036

ehaitech-marketing-consultant-

Background of the issue:
I am trying to solve a problem with my WordPress site using WPML. The issue occurs after translating a page.
hidden link
hidden link

Symptoms:
After the page is translated, it becomes an empty page when opened.

Questions:
Why does the page become empty after translation?

September 27, 2025 at 2:58 pm #17438089

Itamar
WPML Supporter since 02/2016

Languages: English (English )

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

Hi,

I can see the problem with the Chinese translation here:

The configurations of the Language URL format of 'A different domain per language' depend on the settings on your server. If you misconfigured your server, then WPML provides this 'Not valid' error, as shown in your screenshot. Please ensure to follow our guide on configuring the server for this option.

https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/how-to-use-wpml-with-different-domains-per-language/

Are you following this guide?

Also, I can see that the Permalink Structure on your site is: /%category%/%postname%.html
This is unusual. Especially the fact that it ends with .html.
We recommend using this premalink structure: /%year%/%monthnum%/%postname%/
You can read about it here:
https://wpml.org/home/minimum-requirements/

Can you change the permalink structure of your site and check if it helps?

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****

Regards,
Itamar.

September 28, 2025 at 6:03 am #17438559

ehaitech-marketing-consultant-

We tried your method but it still didn't work. And after enabling wpml, the entire website page disappeared

September 28, 2025 at 8:03 am #17438626

Itamar
WPML Supporter since 02/2016

Languages: English (English )

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

Hi, and thanks for trying my suggestions.

If you require additional assistance with this, please share the access details to your site with me. I'm enabling a private message for the following reply.

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/
**IMPORTANT**
- - Please back up the site files and database before providing us access. --
-- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.--

Regards,
Itamar.

September 29, 2025 at 7:25 pm #17442136

Itamar
WPML Supporter since 02/2016

Languages: English (English )

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

Hi, and thanks for the access details.

Here are my findings from investigating things on your site.

1. There is no problem with validating the second domain xintaikejizh.yhct.top. I just checked it and I got "Valid". Please see the attached screenshot valid-ok.jpg.

2. This page does not exist and results in a 404 page.
hidden link
Please see the attached screenshot ch-post-404.jpg.

3. The English page is not translated into Chinese. You can see it by the plus icon next to "Chinese (Simplified)". Please see the attached screenshot page-not-translated.jpg. You can see it here: hidden link

You need to translate this page into Chinese.

4. There is no assigned Homepage or Post page, neither for the default language of your site nor for the translated pages. You must assign either the Homepage or Post pages to your site, and they must be translated. You can see it in Settings -> Reading here: hidden link. Please see the attached screenshot no-homepage.jpg.

Regards,
Itamar.

ch-post-404.jpg
page-not-translated.jpg
valid-ok.jpg
no-homepage.jpg
September 30, 2025 at 3:23 am #17442489

ehaitech-marketing-consultant-

We previously reported that the problem of blank translations has not been resolved. After enabling the wpml plug-in, the page does not exist. Then eight pages were published and only one was displayed.

20250930-112241.jpeg
September 30, 2025 at 7:57 pm #17446407

Itamar
WPML Supporter since 02/2016

Languages: English (English )

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

Hi,

Please, try the troubleshooting section.

1. Take a backup of the DB of your site.

2. Go to WPML -> Support -> Troubleshooting (link)

3. Once on the troubleshooting screen, press the following buttons and check if it helps. Press each button at a time and wait for the process to complete.

- 'Disable cache for language switcher templates'

- 'Clear language information and repopulate languages' button (if it is showing)

- 'Synchronize posts taxonomies' for 'Pages'

- 'Clear the cache in WPML'

- 'Remove ghost entries from the translation tables'

- 'Fix element_type collation'

- 'Fix WPML tables collation'

- 'Synchronize local job ids with ATE jobs'

- 'Synchronize translators and translation managers with ATE'

- 'Assign translation status to duplicated content'

- 'Set language information'

- 'Reset languages' Press this button only if you didn't add a custom language!

- 'Fix terms count'

- 'Fix post type assignment for translations'

- 'Cleanup and optimize string tables'

- 'Check for string issue'

*** Please make a backup of your database before using this.***

Regards,
Itamar.

October 4, 2025 at 2:42 am #17455573

ehaitech-marketing-consultant-

Can you help me directly operate it? My site is a test site, if it breaks it won’t have much impact.

October 4, 2025 at 6:26 pm #17456226

Itamar
WPML Supporter since 02/2016

Languages: English (English )

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

Sure.

The 'Set language information' troubleshooting option fixed the missing pages issue. Please see the attached screenshot.

Regards,
Itamar.

2025-10-04_21-25-20.jpg
October 9, 2025 at 9:53 am #17470256

ehaitech-marketing-consultant-

I have 2 questions to ask:

1. After the website is translated, the visual effect of the website becomes worse.
Header codes:
<?php
/**
* The header for Astra Theme.
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Astra
* @since 1.0.0
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

?><!DOCTYPE html>
<?php astra_html_before(); ?>
<html <?php language_attributes(); ?>>
<head>

<?php astra_head_top(); ?>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php
if ( apply_filters( 'astra_header_profile_gmpg_link', true ) ) {
?>
<link rel="profile" href="hidden link">
<?php
}
?>
<?php wp_head(); ?>
<?php astra_head_bottom(); ?>

<!--自定义-->
<!--<link rel="stylesheet" href="static/css/swiper-bundle.min.css">-->
<link rel="stylesheet" href="<?php echo HX_T_DIR?>static/css/style.css">
<link rel="stylesheet" href="<?php echo HX_T_DIR?>static/css/media.css">

<script src="<?php echo HX_T_DIR?>static/js/jquery-3.6.0.js"></script>
<!--<script src="<?php echo HX_T_DIR?>static/js/swiper-bundle.min.js"></script>-->
<script src="<?php echo HX_T_DIR?>static/js/option.js"></script>
<!--自定义end-->
</head>

<body <?php astra_schema_body(); ?> <?php body_class(); ?>>

<header>
<div class="head_out">
<div class="head">
<div class="top head_width">
<!-- 1752px-->
<div class="lan current">
<div class="item">
<img class="earth" src="<?php echo HX_T_DIR?>static/img/earth.png" alt="">
EN
<img class="select set_select" src="<?php echo HX_T_DIR?>static/img/down.png" alt="">
<div class="other_len set_other_len">

</div>
</div>
<div class="module">
<div class="list"></div>
</div>
</div>
<div id="langs_chajian">

</div>
<div class="out_line">

</div>
</div>
<div class="line"></div>
<div class="bot head_width">
<div class="logo">
">



</div>
<div class="nav">
<!-- 1142px-->

    <!-- 1008px-->
    <?php
    $menu_locations = get_nav_menu_locations();
    $primary_menu_id = $menu_locations['primary'];
    $menu_object = wp_get_nav_menu_object($primary_menu_id);
    $topMenus = wp_get_nav_menu_items($menu_object->term_id);

    if ($topMenus){
    foreach ( $topMenus as $_headOne ){
    if ( $_headOne->menu_item_parent ==0 ){
    ?>

  • <div class="drop">
    url?>">title?>
    <?php
    if (has_son_menu($topMenus,$_headOne->ID)){
    ?>

    <?php } ?>

    </div>
    <?php
    //产品类型的下拉
    if ($_headOne->object == 'product_cat'){
    ?>
    <div class="down">
    <!-- 867px-->
    <div class="module">
    <div class="list_out">
    <!-- 262px-->
    <div class="inner">
    <?php
    $num=0;
    foreach ( $topMenus as $_headTwo ){
    if ( $_headTwo->menu_item_parent == $_headOne->ID){
    ?>
    <div class="list set_man_1" data-num="<?php echo $num ?>">
    url.'?_product='.basename(parse_url($_headTwo->url,PHP_URL_PATH))?>">title?>
    </div>
    <?php
    $num++;
    }
    }
    ?>
    </div>
    <div class="bot_a">
    url?>">View Products >>
    </div>
    </div>

    <?php
    //获取产品属性值 ACF后台属性值
    $args = array(
    'limit' => 1,
    'orderby' => 'date',
    'order' => 'DESC',
    );
    $products = wc_get_products($args);
    $latest_product = current($products);
    $latest_product_id = $latest_product->get_id();
    $fieldsType = get_field_object('shuxing', $latest_product_id);
    $acfFiledsArr = $fieldsType['choices'];
    $middleMenuArr = [];

    $isFilter = isFilterQuery($_headOne->object_id,$acfFiledsArr);
    ?>

    <?php include __DIR__.'/headFilter.php'; ?>

    <?php include __DIR__.'/headOther.php'; ?>
    </div>
    </div>
    <?php
    //产品类型的下拉 end
    }
    ?>

    <?php
    //其他下拉
    if (has_son_menu($topMenus,$_headOne->ID) && ($_headOne->object != 'product_cat')){
    ?>
    <div class="down" data-name="about">
    <!-- 867px-->
    <div class="module">
    <div class="list_out">
    <!-- 262px-->
    <div class="inner">

    <?php
    foreach ( $topMenus as $_headOtherTwo ){
    if ( $_headOtherTwo->menu_item_parent == $_headOne->ID){

    ?>
    <div class="list">
    url?>">title?>
    </div>

    <?php }} ?>

    </div>

    </div>

    </div>
    </div>
    <?php }

    //其他下拉 end
    ?>

  • <?php } }
    } ?>

   
<div class="search set_home_search">
<img src="<?php echo HX_T_DIR?>static/img/search.png" alt="">
</div>
</div>
<div class="menu set_menu">
<img src="<?php echo HX_T_DIR?>static/img/menu.png" alt="">
</div>
</div>
</div>

<div class="head_search ">
<div class="search_top">
<form action="<?php bloginfo('url'); ?>" method="get">
<div class="inner">
<input type="text" name="s" placeholder="Search">
<button><img src="<?php echo HX_T_DIR ?>static/img/search.png" alt=""></button>
</div>
</form>
<div class="search_close set_search_close">
<img src="<?php echo HX_T_DIR ?>static/img/close.png" alt="">
</div>
</div>
</div>
<div class="phone_head">
<div class="close set_close ">
<p>Menu</p>
<img src="<?php echo HX_T_DIR?>static/img/close.png" alt="">
</div>
<div class="module">

</div>
</div>
</div>
</header>

<?php astra_body_top(); ?>
<?php wp_body_open(); ?>

<a
class="skip-link screen-reader-text"
href="#content"
role="link"
title="<?php echo esc_attr( astra_default_strings( 'string-header-skip-link', false ) ); ?>">
<?php echo esc_html( astra_default_strings( 'string-header-skip-link', false ) ); ?>

<div
<?php
echo astra_attr(
'site',
array(
'id' => 'page',
'class' => 'hfeed site',
)
);
?>
>
<?php
astra_header_before();

astra_header();

astra_header_after();

astra_content_before();
?>
<div id="content" class="site-content">
<div class="ast-container">
<?php astra_content_top(); ?>

2. The astra theme of 4.1.6 has a second version problem. Our customized code will have bugs when it encounters wpml.
Bug Problems:
2025/10/09 09:38:18 [error] 3708449#3708449: *33995351 FastCGI sent in stderr: "PHP message: Connection refusedPHP message: PHP Fatal error: Uncaught Error: Call to a member function get_id() on bool in /var/www/xintaiceshi/wp-content/themes/astra/header.php:169
Stack trace:
#0 /var/www/xintaiceshi/wp-includes/template.php(783): require_once()
#1 /var/www/xintaiceshi/wp-includes/template.php(718): load_template()
#2 /var/www/xintaiceshi/wp-includes/general-template.php(48): locate_template()
#3 /var/www/xintaiceshi/wp-content/themes/astra/page.php(20): get_header()
#4 /var/www/xintaiceshi/wp-includes/template-loader.php(106): include('/var/www/xintai...')
#5 /var/www/xintaiceshi/wp-blog-header.php(19): require_once('/var/www/xintai...')
#6 /var/www/xintaiceshi/index.php(17): require('/var/www/xintai...')
#7 {main}
thrown in /var/www/xintaiceshi/wp-content/themes/astra/header.php on line 169" while reading response header from upstream, client: 113.66.116.232, server: xintaikejizh.yhct.top, request: "GET /%e5%85%b3%e4%ba%8e-ledman HTTP/2.0", upstream: "hidden link:", host: "xintaikejizh.yhct.top", referrer: "hidden link"

20251009-175126.jpg
20251009-175126.jpg