Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was unable to translate the Divi theme's Global Header and Global Footer using WPML. When attempting to add these items to the Translation queue, the queue remained empty with the Classic Translation Editor, and a critical error occurred with the Advanced Translation Editor.
Solution:
We checked the issue and discovered that some WPML tables in the database were missing keys, such as

wp_icl_translate

and

wp_icl_translate_job

. We manually created the missing keys for the client. We then asked the client to try translating the templates again to see if the problem was resolved.

If you're experiencing similar issues with translating Divi's Global Header and Global Footer, we recommend checking your database for missing keys in WPML tables and creating them if necessary. However, please note that this solution might be outdated or not applicable to your case. If the issue persists, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket.

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: 

This topic contains 13 replies, has 2 voices.

Last updated by Osama Mersal 1 year, 4 months ago.

Assisted by: Osama Mersal.

Author Posts
February 20, 2024 at 6:05 pm #15324367

A.S.

Hello!

I've got the Divi theme and I'd like to translate the Global Header and the Global Footer manually.

I can see both items in Translation Management > Dashboard. I've already added myself as a Translator for the relevant language pairs.

When I select the Global Header and the Global Footer for translation to add them to the Translation queue, the Translation queue remains empty, even though there are ~30 words to translate at this stage.

Following the instructions here (https://wpml.org/documentation/theme-compatibility/divi-builder/#translating-custom-global-header-footer), I went to WPML > Settings and have activated the "Advanced Translation Editor" instead of the "Classic Translation Editor".

Then I went back to the Translation Management > Dashboard and selected both items to "Translate myself", "Add to the translation queue": I got the message "There has been a critical error on this website. Please check your site admin email inbox for instructions."

So either way, be it with the Classic Translation Editor or the Advanced Translation Editor, I don't manage to translate Divi's Global Header and the Global Footer:
• Either the Translation queue remains empty (Classic Translation Editor)
• Or I get a critical error with WordPress (Advanced Translation Editor).

Could you advise? Thank you in advance for your help.

February 21, 2024 at 9:31 am #15326332

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

1) Please visit the following URLs and check if you can translate the templates.

Footer: yourdomain/wp-admin/edit.php?post_type=et_footer_layout

Header: yourdomain/wp-admin/edit.php?post_type=et_header_layout

Body: yourdomain/wp-admin/edit.php?post_type=et_body_layout

2) Please activate the Advanced Translation Editor. After that, kindly provide the WordPress debug.log; this will allow us to see if any PHP errors are being produced. More Info: https://wordpress.org/support/article/debugging-in-wordpress/

To enable it, open your wp-config.php file and look for the following line:

define('WP_DEBUG', false);

And change it to:

define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Disable display of errors and warnings, which is recommended on a live site.
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);

Then, try to reproduce the issue and check if any errors were saved to the debug.log log file inside the /wp-content/ directory.
It would be great if you could paste your debug.log to https://pastebin.com/ and provide me with that link!

Best regards,
Osama

February 21, 2024 at 6:09 pm #15329937

A.S.

Hello Osama,

Thank you for your reply!

1) I've visited the URLs you provided and the result is the same: when I add one of the elements to the Translation queue, the Translation queue remains empty.

However, you show me that it's possible to access the Header, Body and Footer as a post type (I wasn't aware of that – they don't show up in the list of Posts). Does this mean that I could translate them using the WordPress Editor rather than the WPML Editor? Would that work, i.e. would the translated header automatically show up on the pages in that language? Because I'd be willing to work manually.

2) At the same time, I'd like to understand what the problem is with the WPML Editor.
- I've changed wp-config.php according to your instructions.
- I've then activated the Advanced Translation Editor in WPML > Settings.
- Then I went to Translation Management and selected my Header for translation, "Translate myself", "Add to Translation queue."
- Again: "There has been a critical error on this website. Please check your site admin email inbox for instructions."
- Heading back to the file system, indeed, a debug.log file has appeared.

But I don't know Pastebin and I don't have an account. Is there a more direct/private way for me to send you the content of the debug.log, without a third-party tool?

Kind regards,

A.S.

February 22, 2024 at 7:19 am #15331225

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi A.S,

1) Yes, you can translate the templates manually. Kindly check this guide. (https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/)

2) Please paste the debug log in the ticket, and I'll make the reply private.

Best regards,
Osama

February 22, 2024 at 7:24 am #15331229

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for the log. It seems that you have a database issue. I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
Preferably to a test site where the problem has been replicated.

Your answer will be private, meaning only you and I can access it.

❌ Please backup your database and website ❌

✙ I would need your permission to de-activate and re-activate the Plugins and the Theme and change configurations on the site. This is also a reason the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

Best regards,
Osama

February 22, 2024 at 8:29 am #15331618

A.S.

Hello Osama,

Thank you for the feedback. Just so you don't "wait", I need some time to think about this/set this up, but I'll get back to this thread. (Probably tonight or tomorrow.)

Kind regards,

A.S.

P.S.: Please re-enable the "Private reply" possibility! It seems to be gone now 😉

February 22, 2024 at 8:30 am #15331619

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi A.S,

Sure, please take your time.

Best regards,
Osama

February 25, 2024 at 8:00 am #15341169

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi A.S,

Please check if the access details are correct. I got the following error. (ERROR: The username or password you entered is incorrect. Lost your password?)

Thanks,
Osama

February 25, 2024 at 9:22 am #15341238

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi A.S,

Thanks for the access details. I checked the issue and found that some of the WPML tables in the database are missing some keys. For example:
* wp_icl_translate
* wp_icl_translate_job

I created the missing keys manually. Please try to translate the templates and let me know if it works correctly. (hidden link)

Best regards,
Oasma

February 25, 2024 at 10:17 am #15341269

A.S.

Hello Osama,

Thank you! Using your link, I can now access the Advanced Translation Editor directly. There are no more critical errors.

I'd still have a couple of questions:

• When I go to WPML > Translation Management, and I select the Footer or Header or any page for translation, I only see "Translate automatically" or "Assign to a translator". The previous option *"Translate myself"* is gone (despite the fact that I'm still logged in with the account that is defined as a translator). Do you know why this is?

• When I click "Assign to a translator" instead, I can "Add to the translation basket".
In the Translation Basket, I assign the job to myself.
Then I click "Send all items for translation".
I'm invited to go to to the "Jobs" tab to follow the progress of the translation job.
When I do that, the following notification appears at the top right: *"The Advanced Editor jobs synchronization has failed"*.
However, when I go to "Translations", I see the jobs in the Translation queue and I can work on them.

In sum:

1) Where did "Translate myself" go? Or maybe it's not a useful option here? (Although it would save me an extra step, because now I need to use the Translation basket.)
2) Do you know why I get a notification "The Advanced Editor jobs synchronization has failed"?
3) Lastly, since this is a staging site, could you please indicate how I should proceed to add the keys that you added to the database?

Thank you in advance!

Best,

A.S.

February 25, 2024 at 10:25 am #15341272

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

1) I added the provided account as a translator, so you need to select the translator in the translation basket.

If the site has only one translator, the translation will be sent directly to the WPML-> Translations page.

2) I translated the header template using the Translation Management dashboard and didn't see this error.

3) Please open the two mentioned tables in the live site's database and the staging site's database. After that, please check the structure in both sites to see the missing keys, then add them to the live site's database.

Best regards,
Osama

February 26, 2024 at 5:00 pm #15345582

A.S.

Hello Osama,

Thank you for your reply!

1) OK, that explains it.
2) Never mind for now.
3) I'm afraid this is taking me a great deal of time to figure out how to do correctly. (I don't even see the table "wp_icl_translate_job"?) Could you use the same FTP user/password combination I provided to modify the files in the live site in order to solve the issue? (I've updated the access.)
Note: The staging site and live site are located in the same database.

Thank you very much in advance,

A.S.

February 27, 2024 at 8:31 am #15347606

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

I can't access the database using FTP. The database can be accessed via a database manager like PhpMyAdmin, or a plugin like Adminer from the WordPress dashboard.

So I need to access your live site's dashboard in order to fix the issue. Please make sure you have a backup before providing the access details.

Best regards,
Osama

February 27, 2024 at 9:22 am #15347978

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi A.S,

Please check if the translation editor works correctly now. Kindly make a minor edit to the default language page/post and update it before translating it.

Best regards,
Osama

February 27, 2024 at 10:36 am #15348477

A.S.

Hello Osama,

I've just checked and everything seems to work correctly now. Thank you very much for your assistance, I'm glad this issue is solved!

Kind regards,

A.S.