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.

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

Problem: Secondary Language Home Page will not load — 502 or 504 error Solution: Update WooCommerce Multilingual to 4.6.2.1 or newest versions.

This topic contains 16 replies, has 2 voices.

Last updated by Bruno Kos 5 months, 2 weeks ago.

Assigned support staff: Bruno Kos.

Author Posts
April 24, 2019 at 8:48 am #3670561

webM-3

I am trying to:
accessing my site (secondary language)

Link to a page where the issue can be seen:
hidden link

I expected to see:
the homepage in Chinese

Instead, I got:
504 Error

April 24, 2019 at 2:02 pm #3673727

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support!

Before we investigate this issue further, could you make sure your server conforms to our minimum requirements?
https://wpml.org/home/minimum-requirements/

Based on provided debug information, I can see the following - WP Memory Limit: 40M.

Specifically, could you set WP Memory limit to at least 256MB?
https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

If unsure on how to set this, you can consult your host/server admin to do this. After you increase this value, you can confirm it by checking on WPML -> Support by finding the “Memory limit” value.

Another thing, can you update WPML plugin and all its addons as well? We can only support our clients if they have the latest versions installed, as this means that there have been many upgrades, bug fixes and general improvements since.

I can see that you have WPML Multilingual CMS 4.2.0, WPML String Translation 2.10.0, etc.

You can see which versions are the latest ones here:
https://wpml.org/account/downloads/

Let me know once you get there and if the issue is still present.

Regards,
Bruno Kos

April 24, 2019 at 3:32 pm #3674737

webM-3

Hi Bruno,

It is super strange to see the plugins are out-of-date because these updates did NOT show up at my WordPress Updates Panel. Could this be because I have updated the site to use HTTPS (but it was using HTTP when I setup the account at WPML).

This seems like a solution to my problem:
https://wpml.org/errata/timeouts-with-woocommerce-multilingual-4-6-1/

But following the steps to change the plugin file did NOT solve the problem.

Thank you.

April 24, 2019 at 5:00 pm #3675443

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Could this be because I have updated the site to use HTTPS (but it was using HTTP when I setup the account at WPML).

That may be possible - can you tell if you registered the key once again and were able to update the plugins, but the issue is still there?

If nothing works (plugin updates either), can I ask you the following then? In order to debug this issue , can you install Duplicator plugin and create package so that I can try this on my localhost and possibly escalate further to 2nd tier?

https://wpml.org/faq/provide-supporters-copy-site/

Let me know if this is OK with you.

If yes, I will need WordPress admin username and password so I could download those packages. I have marked your next reply private so you can safely add this information.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Please make a full backup of your site before sharing this info!

Regards,
Bruno Kos

April 25, 2019 at 8:53 am #3680299

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Let's enable the WordPress debug log then, as this will allow us to see if any PHP errors are being produced and which errors. This may give us a better idea on what is behind the scenes.

1. Edit wp-config.php and insert the following lines:

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

2. Reproduce the issue - so open pages that produce 502 or 504.

3. Locate the debug log in: /wp-content/debug.log

4. Paste the latest lines here. No need to paste the entire log file, just 50 lines or so will do. Please censor any sensitive information.

https://codex.wordpress.org/Debugging_in_WordPress

Regards,
Bruno Kos

April 25, 2019 at 9:42 am #3680677

webM-3

Hi Bruno,

I switched from Primary Language Main Page to Secondary Language Main Page.

It took a long time to load, and only loaded a small portion of the site.

Here's the debug.log:

[25-Apr-2019 09:35:06 UTC] PHP Fatal error: Maximum execution time of 300 seconds exceeded in /www/shopidnworldcom_416/public/wp-includes/post.php on line 706
[25-Apr-2019 09:35:06 UTC] PHP Warning: Error while sending QUERY packet. PID=9437 in /www/shopidnworldcom_416/public/wp-includes/wp-db.php on line 2007
[25-Apr-2019 09:36:42 UTC] PHP Warning: Error while sending QUERY packet. PID=9581 in /www/shopidnworldcom_416/public/wp-includes/wp-db.php on line 2007

Hope this helps.
Thank you!

April 25, 2019 at 11:43 am #3681873

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

We have several other cases of similar issues that may have the same culprit. Can I advise that you rollback to the latest WCML version that worked perhaps, until I hear from 2nd tier on how to proceed? We do have a possible fix and am yet collecting more information about this.

Regards,
Bruno Kos

April 25, 2019 at 11:53 am #3681975

webM-3

Sure no problem! I have already rolled-backed on my production site. Good luck with the debug, and thanks for your help with the investigations. Allbest, chris.

April 25, 2019 at 12:51 pm #3682601

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

It seems like that this WooCommerce Multilingual performance issue fix is going in 4.6.2. version which should be published hopefully soon, perhaps in few days at most.

Can you wait on this thread until that happens, update the plugin and tell me if it fixed your site issues?

Regards,
Bruno Kos

April 25, 2019 at 12:57 pm #3682627

webM-3

No problem man! I will keep the Staging Site as it is, wait for the 4.6.2 update and update you on my results.

April 25, 2019 at 12:58 pm #3682629

Bruno Kos
Supporter

Languages: English (English )

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

Great!

April 29, 2019 at 3:21 am #3699907

webM-3

Hi Bruno, unfortunately, the update of WooCommerce Multilingual to 4.6.2 did not fix the issues experienced with accessing the secondary language.

April 29, 2019 at 10:02 am #3701955

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

WooCommerce Multilingual 4.6.2.1 has been released. Can you let me know if the issue is still there?

Regards,
Bruno Kos

April 29, 2019 at 11:11 am #3702551

webM-3

Hi Bruno,
Unfortunately, the update did not solve my issue. The site loads fine in the primary language — but refuses to load secondary language. All plugins/wp core are up-to-date.
hidden link

April 29, 2019 at 2:28 pm #3704403

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Sorry to hear that :(. Can you tell me what shows up in debug.log now when this happens? Previously we've had "Maximum execution time of 300 seconds exceeded" that should have been resolved by now (based on our reports, it resolved this issue with almost all of your clients, all my clients reported that it got resolved).

So there might be something else happening here - let's see if debug.log will show something else now.

Regards,
Bruno Kos