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
- 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 -
- 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 -

Supporter timezone: Asia/Kathmandu (GMT+05:45)

Tagged: 

This topic contains 4 replies, has 0 voices.

Last updated by Shekhar Bhandari 1 week, 1 day ago.

Assisted by: Shekhar Bhandari.

Author Posts
December 20, 2024 at 10:38 pm #16535603

danieleG-29

Background of the issue:
I created a new site using WPML on the develop.simoneromani.it site and moved it to the official domain romaniservices.it. After this, I created a registration key for this domain. The issue can be seen at hidden link.

Symptoms:
When navigating the site by clicking on the English flag, some pages like the Home page appear with problems. Recreating the page in English gives the same error. The WPML version update fails as the system cannot connect.

Questions:
Why do some pages appear with problems after moving the site?
Why can't I update the WPML version due to connection issues?
Can you help me to solve the problem?

December 22, 2024 at 11:34 am #16537519

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Welcome to WPML support. Would you please follow the steps below to make sure the connection between wpml.org and your website is possible?

https://wpml.org/faq/wpml-plugin-cannot-connect-to-wpml-org/

Most probably you need to contact your hosting service provider and ask them to whitelist the addresses below:

wpml.org
cdn.wpml.org
api.wpml.org
api.toolset.com
cloudfront.net

Also please make sure that the WordPress debugging is enabled so that instead of the error you gave the screenshot you see the error message:

Would you please access your website files and edit the "wp-config.php" file on the root folder of your WordPress installation and add the code below into the file:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );

Please add the code above the line below:

/* That's all, stop editing! Happy blogging. */

For more information:
https://wpml.org/documentation/support/debugging-wpml/

Thanks.

December 22, 2024 at 3:16 pm #16537876

danieleG-29

Hi,
I have enabled the site debugging as requested, but I can't see the errors.

I'm also sending you the screenshot of the requested information.

Thanks
Daniele

screenshot-1.jpg
December 23, 2024 at 1:41 pm #16540579

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi Daniele,

Thank you for the information. It should be possible to use the manual update method to update WPML.

- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Make sure you are signed in wpml.org.
- Go to https://wpml.org/account/downloads/
- Click the "Download WPML manually" link to show the rest of the plugins on the page.
- Download the latest version of the WPML and its add-ons.
- Install them manually on your website using the method below:
https://wpml.org/faq/updating-wpml-manually/

If the issue persists, I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

Also tell me which page to check for the problem.

Thanks.

December 26, 2024 at 8:27 am #16546358

danieleG-29

Hi Christopher,
before proceeding I have a question: deleting WPML and its ads and reinstalling it via OTGS Installer will the pages that I previously translated into English be lost?

Or will the pages become visible again later?

Thank you

December 26, 2024 at 11:52 am #16546734

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

The translations will not be lost. And after installing the new version it should show.

But I highly suggest that you have a backup of the database before doing so.

By the way, you do not need to delete anything. As I mentioned, you can download the individual plugins of WPML from the URL I mentioned and upload them to your WordPress installation and WordPress will ask you to replace the new one with the old.

Thanks.

December 29, 2024 at 2:26 pm #16551310

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you for the info. I went to the website and updated the WPML plugins and the issue persisted.

I enabled the debug mode and found out that the issue is happening on the theme you use.

But unfortunately, I missed the translation of that page during the debugging. I'd appreciate it if you could restore the backup and get back to us.

What I want to do is as follows:

- Update WPML plugins
- Go to this file:

/wp-content/themes/energia/elementor/templates/widgets/cms_service_carousel/layout1.php:99

And change the PHP code below:

$service_feature = get_post_meta($post->ID, 'service_feature', true);
$result_feature = count($service_feature);

with:

$service_feature = get_post_meta($post->ID, 'service_feature', true);
$service_feature = is_array($service_feature) ? $service_feature : [];
$result_feature = count($service_feature);

That should fix the error that is happening on your website:

Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given.

Please also contact the Theme developer about the issue because I am not sure my solution will be a permanent one and you need to consult wth the theme developers as that is their code.

Also if you leave my changes and after a while update the original theme the file will overwrite the changes.

That is why this needs to be fixed on the theme level and not by us.

But I will be happy to apply the workaround I mentioned after you restore a backup.

By the way, the difference between the other server that worked and this server which is not working might be the version of PHP used on the servers. The error happens on version 8.2. Maybe the other server that did not have the error had older version of PHP.

Thanks.

December 30, 2024 at 8:35 am #16552332

danieleG-29

Hi Christopher,
I restored the backup.

I also asked the server manager to change the PHP version.

Inside the ftp you should find some error logs, but I'm writing here some of those that were sent to me by the provider and that were probably generated by me during some tests yesterday.

The access data to the ftp and administration are always the same.

If you need the access data to the database let me know.

I also asked the provider to open the communication to the WPML sites that you wrote to me, but I don't know if it's working.

Otherwise you can also tell me if there is some command to insert on the "linux-debian" machine.

These are some errors:
[Mon Dec 30 01:19:14.045095 2024] [proxy_fcgi:error] [pid 226366:tid 226388] [remote 81.56.48.137:43128] AH01071: Got error 'PHP message: PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

wp-user-avatar

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/users/laromanisrl/www/romaniservices.it/wp-includes/functions.php on line 6114; PHP message: PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

woocommerce

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/users/laromanisrl/www/romaniservices.it/wp-includes/functions.php on line 6114; PHP message: PHP Notice: Function _load_textdomain_just_in_time was called incorrectly.

[Mon Dec 30 01:34:47.706455 2024] [proxy_fcgi:error] [pid 226366:tid 226382] [remote 2.37.205.252:46316] AH01071: Got error 'PHP message: PHP Warning: Undefined array key 0 in /home/users/laromanisrl/www/romaniservices.it/wp-content/plugins/translatepress-multilingual/includes/queries/class-gettext-insert-update.php on line 61'

Thank you
Daniele

December 30, 2024 at 10:38 am #16552926

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you very much. I updated WPML plugins and also change the code in "Energia" theme according my previous reply and it fixed the issue:

hidden link

As mentioned before, this means you need to contact the "Energia" theme developers and inform them about the problem and ask them to fix this by themselves as I directly changed a file in the theme that will be overwritten if you update that theme in the future.

This shows that the problem pertains to the theme and not WPML.

Thank you.

December 30, 2024 at 11:04 am #16552948

danieleG-29

Hi Christopher and thank you!
I sill see the problem on this page (in Italian and English): hidden link

Could you fix it please?

After this I'm also going to write to the theme developer to ask information about this problem for the future.

Thank you!
Daniele

December 30, 2024 at 11:13 am #16552970

danieleG-29

Sorry Christopher, I forgot also this page: hidden link

The others seems to work properly.

Thank you so much.
Daniele

December 31, 2024 at 7:59 am #16555045

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello

Christopher is on vacation so I am taking care of the ticket.

I tried to use the ftp to check the debug log on that page but I was unable to as the ftp details is not working.

Can you check if the ftp details are correct or provide me the debug.log file content.

Thanks

December 31, 2024 at 8:51 am #16555103

danieleG-29

Hello Shekhar,

I installed a plugin in the wordpress backend to manage files in ftp. I'll send you a screenshot.

Let me know if you can work with this. Thank you very much.

Daniele

Screenshot 2024-12-31 alle 09.49.31.png
December 31, 2024 at 8:56 am #16555119

danieleG-29

If you go now on the website you can see also this error message (is probably debug mode activated?):

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the redux-framework domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/users/laromanisrl/www/romaniservices.it/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-user-avatar domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/users/laromanisrl/www/romaniservices.it/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the translatepress-multilingual domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/users/laromanisrl/www/romaniservices.it/wp-includes/functions.php on line 6114

Notice: La funzione _load_textdomain_just_in_time è stata richiamata in maniera scorretta. Il caricamento della traduzione per il dominio redux-framework è stato attivato troppo presto. Di solito è un indicatore di un codice nel plugin o nel tema eseguito troppo presto. Le traduzioni dovrebbero essere caricate all'azione init o in un secondo momento. Leggi Debugging in WordPress per maggiori informazioni. (Questo messaggio è stato aggiunto nella versione 6.7.0.) in /home/users/laromanisrl/www/romaniservices.it/wp-includes/functions.php on line 6114

Thank you
Daniele

December 31, 2024 at 9:10 am #16555160

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

The following fatal error is happening on the page creating the error

PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /home/users/laromanisrl/www/romaniservices.it/wp-content/themes/energia/inc/template-tags.php:1043
Stack trace:
#0 /home/users/laromanisrl/www/romaniservices.it/wp-content/themes/energia/inc/template-tags.php(1327): energia_get_service_grid_layout1()
#1 /home/users/laromanisrl/www/romaniservices.it/wp-content/themes/energia/elementor/templates/widgets/cms_service_grid/layout1.php(96): energia_get_post_grid()

I attempted to find a workaround but was unsuccessful, so I recommend reaching out to the theme author for a resolution.

You can also try to update the original page and complete the translations to 100 to see if it helps. hidden link

Look forward to your reply.

Thanks