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.

Tagged: 

This topic contains 0 replies, has 0 voices.

Last updated by vigoZ 1 day, 19 hours ago.

Assisted by: Dražen.

Author Posts
February 11, 2025 at 12:50 pm

vigoZ

Background of the issue:
I am trying to resolve an issue with a WooCommerce product that has 231 variations using the Porto theme. Before installing WPML, I increased the WP variation limit with a PHP script, which worked well. After installing WPML, the product page does not render the body part, only the header and footer. I identified the issue with the WPML String Translation plugin. The issue can be seen at: hidden link

Symptoms:
The product page with 231 variations does not render properly, showing only the header and footer. Variations are limited to 80 per product despite a PHP script for 500 variations.

Questions:
Why does the product page not render properly after installing WPML?
How can I have more than 80 variations per product with WPML?

February 11, 2025 at 1:11 pm
February 11, 2025 at 1:13 pm #16691710

Dražen
Supporter

Languages: English (English )

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

Hello,

as notified I have created a ticket, so let's continue here.

1) Create a staging site and confirm issue still happens when usingthe Porto default parent theme, and only WPML plugins and Wocommerce, all others disabled.

2) Update WPML plugins to the latest versions from Plugins > Add new > Commercial tab and click Check for updates.

3) If the issue still happens please share admin and FTP access to staging site so I can check and confirm the issue.

Regards,
Drazen

February 11, 2025 at 1:31 pm #16691905

vigoZ

Update.
The script, which was responsible for increasing the variation number to 500

add_filter('woocommerce_ajax_variation_threshold', function() { return 500; });

or

add_filter('woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2);
function custom_wc_ajax_variation_threshold( $threshold, $product ) {
return 500; // Increase the threshold for showing variations dynamically
}

was conflicting with WPML String Translator.

After trying many combinations, and deleting the script, the product shows up, but yes, the variation doesn't work as it should. (not working product variation filtration, when selecting any attribute, all others shown available).

Video: hidden link

February 11, 2025 at 1:34 pm #16691924

vigoZ

Can I just drop the credentials here in chat? I do not see any "Add credentials"

February 11, 2025 at 1:54 pm #16692014

Dražen
Supporter

Languages: English (English )

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

Hello,

as I understand original issue is solved and your custom code was the culprit for that problem.

As for 2nd part of the issue, we might need to understand better the issue and open a new ticket since we limit 1 issue per ticket to keep things and conversations clear.

1) Does the issue happen on your default language or translated product?

2) Does the issue happen when WPML plugins are disabled?

3) Does the issue happen when using the WP default theme and only WPML plugins and Wocommerce enabled?

Regards,
Drazen

February 11, 2025 at 3:04 pm #16692479

vigoZ

1) In the default language, this product is still not translated.
2)
a) On the child Porto theme, when all other plugins are enabled, WPML is active, but WPML String Translator is disabled, the script works fine.
b) On the child Porto theme, when all other plugins are enabled, WPML is active, the script breaks the product layout.
c) On the child Porto theme, when all other plugins are disabled, WPML is active, the script breaks the product layout.
d) On the child Porto theme, when all other plugins are disabled, WPML is active, WPML String Translator is disabled, the script works fine.
e) On the child Porto theme, when absolutely all other plugins are disabled, WPML is disabled, the script breaks the product layout. Its more because of missing the main theme functionality.
f) On the child Porto theme, when absolutely all other plugins are disabled, WPML is disabled, no script, the product layout is not rendered, because of theme functionality.
g) On the child Porto theme, when non-sensitive plugins are disabled, (active plugins Elementor, Elementor Pro, Porto Functionality), WPML is disabled, the script works fine.
g) On the parent Porto theme, when all plugins are disabled, WPML is disabled too, no script, product layout rendered, variation not working/not filtrating variations.
i) On the parent Porto theme, when all plugins are disabled, WPML is disabled too, the script works fine.
j) On the parent Porto theme, when all plugins are disabled, WPML is enabled, the script works fine.
k) On the parent Porto theme, when all plugins are enabled, WPML is enabled, the script works fine.

Saved you 2 hours of debugging 🙂

February 12, 2025 at 7:04 am #16694210

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for the detailed debugging and for getting back to us.
I must say it confused me more than it helped me understand since you reported before another issue and at first I understood the original was resolved and we are moving to 2nd.

So, let's get back to the original issue with the product not being rendered, and if you have any other issue please opew new ticket for it.

As I understood from your last reply product layout shows up fine in such cases:
"On the parent Porto theme, when all plugins are enabled, WPML is enabled, the script works fine."

As it seems the issue is with your child theme/custom code, note that we can not debug or support custom code or issues with custom code as per our policy. For such cases, you can hire WPML Contractor: https://wpml.org/contractors/

Let me know if I maybe understood something wrong here and we can still help out.

Regards,
Drazen

February 12, 2025 at 7:41 am #16694320

vigoZ

I could agree, but the fact that the child theme is not working with WPML String translator I can also point to your side, not only to the Porto theme. So you also must check from your side, why WPML String translator is conflicting with the Porto child theme. I am also in contact with Porto developers and of course, they are saying "Please contact with WPML, because after the installation of WPML the issue appears."
Now we are getting to the classic scenario, when we have a bug and both sides pushing to another side. But it is clearly WPML responsibility too. How I can provide you with a Duplicator copy? I am sure that in less than 1 hour you will see better where is the issue instead of asking me to do the testing job and come back with the answer which will lead to a new question.
I hope we understand each other.

February 12, 2025 at 9:27 am #16694898

Dražen
Supporter

Languages: English (English )

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

Hello,

sure, if the Porto child theme is the default one, and not with some added custom code. That is what I have assumed from the reply, that the child theme has some custom addition there and it works fine with the default parent theme where there is none.

If you wish, sure I can check further on the staging site or duplicator, but note that I will create a new child theme (use latest parent theme) and check if the issue happens if your child theme contains some custom code/changes.

Regards,
Drazen

February 17, 2025 at 7:29 am #16711799

vigoZ

Issue not solved.