Skip Navigation

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
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+01:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Bruno Kos 1 month, 1 week ago.

Assisted by: Bruno Kos.

Author Posts
October 17, 2024 at 6:30 am

duanmanZ

Background of the issue:
I am trying to translate my website using WPML.

Symptoms:
I am unable to translate my website.

Questions:
Unable to translate my website

October 17, 2024 at 7:49 am
October 17, 2024 at 1:14 pm #16300340

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

We are still checking this as we had another report. I will get back to you as soon as I have some news on the matter.

October 21, 2024 at 6:10 am #16310272

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

Can you please try the following:

1. Edit the `plugins/elementor-pro/core/utils.php` file and locate the `get_current_post_id` function. Update the function as follows:

   public static function get_current_post_id() {
       if ( ! is_admin() && isset( Plugin::elementor()->documents ) ) {
           return Plugin::elementor()->documents->get_current()->get_main_id();
       }
   }

2. After making this change, try to reproduce the error by resaving any Elementor item. You can use this URL to test it: [hidden link).

3. Once you've resaved the item, check if the gear icon appears for the Spanish language (or any other language).

October 21, 2024 at 6:13 am #16310276

duanmanZ

Glad to receive your reply

Unfortunately, I don't know how to edit php files, I can provide ftp and other related information. Can you help me operate it?

October 21, 2024 at 9:08 am #16311082

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

I marked your next reply as private so you can share FTP and WordPress data.

October 21, 2024 at 9:13 am
October 21, 2024 at 1:41 pm #16312597

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

Looks to be working now. I tested with

public static function get_current_post_id() {
    if ( isset( Plugin::elementor()->documents ) && ! is_null( Plugin::elementor()->documents->get_current() ) ) {
        return Plugin::elementor()->documents->get_current()->get_main_id();
    }

    return get_the_ID();
}

I resaved hidden link couple of times but noticed no new entries in ATE logs, translations got completed successfully.

The topic ‘[Closed] Unable to translate my website’ is closed to new replies.