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.

Our next available supporter will start replying to tickets in about 1.26 hours from now. Thank you for your understanding.

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

Tagged: 

This topic contains 7 replies, has 2 voices.

Last updated by mazenN 2 months, 2 weeks ago.

Assigned support staff: Bruno Kos.

Author Posts
July 26, 2019 at 4:34 am #4287327

mazenN

some times When i open a translated pages, I see this message. some times the page come regular but when refresh the page, the error message comes.
I update WordPress and MySql to latest version and my memory limit set to 256M.

Link to a page where the issue can be seen:
hidden link
I expected to see:
Translated page
Instead, I got: 500 internal server error

July 26, 2019 at 6:43 am #4287777

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support!

Can you please have a look at this answer of mine? I posted it today for one of my other clients and they seem to be having the same issue - error 500. However, it is possible that you will need to check server logs to trace the error:
https://wpml.org/forums/topic/conflict-with-edd/#post-4287731

Regards,
Bruno Kos

July 26, 2019 at 7:18 am #4287855

mazenN

Thanks Bruno.
I took a look at other issue and checked server error logs which display the following:

[26-Jul-2019 07:13:28 UTC] add_to_cart_fragments is deprecated since version 3.0.0! Use woocommerce_add_to_cart_fragments instead.

what is that meaning? and why this error comes when refresh some translated page

July 26, 2019 at 7:38 am #4287927

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support!

It means this:
https://wordpress.org/support/topic/add_to_cart_fragments-is-deprecated-since-version-3-0-0/

Specifically, this:

"If the error still came up with WooCommerce core disabled, then it’s either your theme or another plugin using the deprecated hook and I would recommend you re-enable WooCommerce core, then switch to a default theme, like Storefront (https://wordpress.org/themes/storefront/), and disable all other plugins, to see if it goes away. If it does, you’ll need to re-enable features until it comes back up, then contact the author of the theme/plugin and have them update their code to use the correct woocommerce_add_to_cart_fragments hook"

This could happen at any time, not only during translations. Therefore I suggest the following:
- install this plugin: https://wordpress.org/plugins/string-locator/
- try searching for "add_to_cart_fragments" either within the theme or plugins folder
- once you find it (it should be there), then you will either need to code this not to use this deprecated function or perhaps use another theme which uses the latest WooCommerce code
- ask the theme developer to update WooCommerce templates that use this

Regards,
Bruno Kos

July 26, 2019 at 7:39 am #4287929

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Also see this:
hidden link

Regards,
Bruno Kos

July 26, 2019 at 7:49 am #4288005

mazenN

Ok I will check with my theme and plugins.
Note: this error only comes with some of translated pages. all original pages run perfectly.

July 26, 2019 at 8:17 am #4288267

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Note: this error only comes with some of translated pages. all original pages run perfectly.

If the issue persists even after you fix this (meaning that you will still get server error 500), then we can have a look at what the logs say further, because as I said, it is likely that PHP debug log will bring us nothing, as the error will occur before WordPress even loads.

Regards,
Bruno Kos

August 3, 2019 at 5:33 am #4334035

mazenN

My issue is resolved now. Thank you!