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.

This topic contains 54 replies, has 2 voices.

Last updated by basv-25 1 year, 5 months ago.

Assisted by: Andreas W..

Author Posts
June 22, 2023 at 3:36 pm #13879179

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hallo,

In der Tat hatte ich nur mit einem Duplikat getestet.

Ich habe den Second Tier Support darüber informiert und werde mich wieder melden, sobald ich von dort eine Rückmeldung habe.

Mit freundlichen Grüßen
Andreas

June 22, 2023 at 4:12 pm #13879511

basv-25

Danke!

June 22, 2023 at 5:09 pm #13879921

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hallo,

Gern geschehen.

Sogar dann, wenn ich das Staging mit einem Standardtheme und alleine WC und WPML teste, sehe ich eine Ladezeit von 100 Sekunden, wenn wir das Produkt editieren und erneut speichern (allerdings keinen Error).

Ich habe den Second Tier Support darum gebeten, sich das nochmals genauer anzuschauen.

Sobald ich Neuigkeiten habe, werde ich mich wieder melden.

Mit freundlichen Grüßen
Andreas

June 22, 2023 at 6:34 pm #13880273

basv-25

Perfect, thanks, have a nice evening,

June 23, 2023 at 2:02 am #13881469

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Wishing the same for you!

Best regards
Andreas

June 27, 2023 at 11:14 am #13901829

basv-25

Hi Andreas, I'm going to refresh the staging area to a more up-to-date version. I shall then create a new login and password for you. Can I email these in a private field to you?

June 27, 2023 at 2:55 pm #13904029

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Yes, for sure.

The private reply form is enabled again.

The second-tier support recommended adding the following snippet to the functions.php file of your Salient Child Theme:

add_action ('wp_insert_comment', 'test_remove_hooks0', 1, 10);
function test_remove_hooks0($var) {
	global $wp_filter;
	    foreach ( $wp_filter["wp_insert_comment"]->callbacks[100] as $key => $value ) {
		    if ( str_contains( $key, 'duplication_insert_comment' ) ) {
			    remove_action( 'wp_insert_comment', $key, 100 );
		    }
	    }
	return $var;
}

Could you please test this on your staging and let me know if this solves the issue?

Best regards
Andreas

June 28, 2023 at 8:21 am #13907747

basv-25

Hi Andreas, I've tested the code on our live environment.

I saved a product in the English language with 12 duplicates. The saving with the custom code takes 34 seconds. Without the custom code it takes 29 seconds. It doesn't seem to influence the saving time or at least not in a good way 🙂

For me that the saving takes 34 seconds with 12 duplicates is exactable but I'm not sure if it is crazy long or that this is standard.

Thanks for your advice,

June 28, 2023 at 7:26 pm #13913347

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I would honestly say that this is fine, as a saving time of 8-10 seconds can be normal even when using only 4 languages.

The more custom fields and attachments a content has will extend the processing time of the queries.

You are using many languages and the fact that we are handling duplicates requires more DB queries than usual which for this loading time might sadly be normal in this case.

Do you have a saving time of about 30 seconds even without using the comment duplicate option?

If so, for now, I would like to ask for some patience, as we have already escalated this issue to the developers who are reviewing this issue - as mentioned earlier, we might consider excluding review duplication if the post comment duplicate option is enabled.

(we have an option for displaying reviews in all languages in WCML already)

Best regards
Andreas

June 29, 2023 at 7:55 am #13915515

basv-25

Hi Andreas, thank you for your prompt reply. Indeed have saving time of 30 seconds (with 12 duplicate languages) without the duplicate comments option activated. I now use the "show comments in all languages option" of WCML.

I do have one more question on the option of "show comments in all languages":

On this page (Belgium):
hidden link

You can can see the reviews (untranslated) from a customer in the USA + Austria + USA (see print screen as well).

I would expect that the flags above the stars are the flags of the reviewers language (the original review is made in the languages en_US + de_AT + en_US.

So I would expect 2 US flags and one AT flag. Not the flags of the current selected language.

Can you help me on this as well?

Thanks so much Andreas!

Scherm­afbeelding 2023-06-29 om 09.51.50.png
July 1, 2023 at 9:51 pm #13928221

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hallo,

Ich kann mich hier leider nicht mehr anmelden, weil der Nutzer wohl nicht mehr existiert.

Kannst Du mir bitte nochmals Zugriff, idealweise zur Staging Site, erteilen?

Das private Antwortformular ist erneut aktiviert.

Mit freundlichen Grüßen
Andreas

July 3, 2023 at 11:23 am
July 5, 2023 at 4:47 am #13945537

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Your site is now using 30 active languages - from those many custom languages.

I create a new product, left a review as admin, then duplicated the product into all 30 languages, and afterward edited and saved the product.

Take note that I already experienced a longer loading time when creating this original product and when leaving the admin review.

It took about 25 seconds to create the duplicates for all 30 active languages.

For a product without review creating the duplicates take about 17 seconds.

Editing and updating the original product took about 30-40 seconds for creating duplicates in 30 languages if the product has at least one review.

I get the same results, even when testing only with WooCommerce, WPML, and the Twenty Twenty One Theme.

Without WPML and only with WC and WCML the product updates in about 6 seconds.

If I enable WPML again and test with a new product that does not have a review but is duplicated into 30 active languages, the execution time on edit and save is taking me about 24 seconds - even without having any review.

This is clearly related to the number of active languages and the queries needed to create the duplicates and I would say at this point that this loading time is expected.

This means, the issue is clearly connected to the fact, that WPML needs to create duplicates in many languages and the fact that a review is placed on the product will even cause more queries to run, but a long execution time I do even see without reviews here.

Sadly, at this point, I am not able to confirm if this is somehow hosting-related, as I can not take a copy of the site for testing it on a virtual server, as Kinsta does not allow it.

What I can offer is setting up a local install with WordPress and migrating your database over there one more time for another test.

I would like to ask you for some patience on this matter.

Best regards
Andreas