Skip Navigation

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

Problem:
The client reported significant slow performance with the WPML plugin activated, particularly when the String Translation plugin is enabled. The issue persisted despite switching themes and disabling third-party plugins. Profiling indicated that the slowdown was related to the ACF Multilingual plugin, specifically with the handling of WYSIWYG fields in custom post types (CPTs).
Solution:
We identified a specific code snippet causing the issue in the ACF Multilingual plugin. We recommended modifying the code in the

ACFML\Field\FrontendHooks::convertTargetLinks

file. The client should locate the line:

if ( $isWysiwygField && is_string( $value ) ) {

and change it to:

if ( $isWysiwygField && is_string( $value ) && strpos($value, 'http') !== false ) {

This change prevents unnecessary processing unless the field contains a link, which should mitigate the performance issue. We are also working on a more permanent solution to be included in future WPML releases.

If this solution does not resolve your issue, or if it seems outdated, we recommend opening a new support ticket. Additionally, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at WPML support forum.

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 8.53 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 24 replies, has 2 voices.

Last updated by Bobby 2 months, 1 week ago.

Assisted by: Bobby.

Author Posts
July 6, 2024 at 7:26 am #15902484

georgeC-7

Yeah sure! Please open a Private answer so I can send you the credentials!

July 8, 2024 at 5:56 pm #15914976

georgeC-7

Hello Bobby,

Are you still working on our issue?

July 8, 2024 at 6:42 pm #15915226

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Yes I am still working on this issue, apologies on the delayed response as our team is offline during the weekend hours.

private reply has been re activated

July 10, 2024 at 11:39 pm #15930525

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you I was able to access the database.

2 tables show a large size but I am not 100% sure this not expected yet. I will have our team take a look into them and update you.

If possible, please visit the previous private reply we had and update our access details as the username is no longer working for me.

July 11, 2024 at 7:05 am #15932893

georgeC-7

Thank you!
I've updated the credentials for the WP Dashboard and now it works.

July 11, 2024 at 10:24 pm #15938010

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

Thank you for the additional information,

I escalated this thread to our 2nd tier support and they will take a look at this issue.

You will be notified as soon as new information is available.

Thank you,
Bobby

July 12, 2024 at 12:49 pm #15942580

georgeC-7

Thank you very much for your support, Bobby. I greatly appreciate your assistance.

July 12, 2024 at 11:12 pm #15944925

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

We were able to locate the issue and relate it to the ACF Multilingual plugin.

Specifically related to the CPTs and the ACF WYSIWYG field in them.

There are a lot of product attributes and upon visiting the home page, where there is a WYSIWYG field, the way he handles the value causes slowness.

Our team is currently working on this and in the meantime, you can try the following workaround.

It is not ideal, as if you have a link it will trigger the same slowness, but at least will fix the issue when you don't have links in the WYSIWYG fields which at the moment I don't believe you have any.

go to \ACFML\Field\FrontendHooks::convertTargetLinks in wp-content/plugins/acfml/classes/Field/FrontendHooks.php

find this piece of code:

if ( $isWysiwygField && is_string( $value ) ) {

change it to

if ( $isWysiwygField && is_string( $value ) && strpos($value, 'http') !== false ) {

NOTE: Always have a recent and working backup before making any changes recommended by our team or a 3rd party

July 15, 2024 at 1:03 pm #15954574

georgeC-7

Great news! The fix worked on both the staging and live sites. Will this be included in the next plugin update?

Thank you, Bobby, for doing an excellent job!

July 15, 2024 at 5:12 pm #15955895

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Glad to hear that and my pleasure!

Our team is already working on a more permanent solution that will be included in future WPML releases, in the meantime you can use this solution as a workaround until then. 🙂

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.