 Bigul
|
Hello,
Thank you for the feedback. I am enabling the private option for the next reply. Hope it will help you share the SSH details. Please check and let us know your thoughts.
--
Thanks!
Bigul
|
 xavierC-5
|
Hi Bigul,
Working in parallel with the Theme developer (Woodmart), we came out with the solution, which it turns out the solution was in some of WPML official forums.
Here I pass you the link with the problem and solution some of your developers give to some other client:
https://wpml.org/es/forums/topic/wpml-activado-error-en-pagina-de-producto-con-algunas-variaciones-de-productos/
In that thread, a colleague shared a solution that actually works and resolves the issue. However, it’s unclear why the WPML team has not yet implemented an official fix??
In the meantime, to ensure my site remains stable, they've provided me with a temporary custom code snippet that fix the issue until WPML releases an update (see the code below). Please check and let me know if that will be implemented soon.
I know I can also edit the plugin but I did prefer to implement that solution instead.
add_action( 'wp', function() {
$hook_name = 'elementor/frontend/the_content';
global $wp_filter;
if ( isset( $wp_filter[ $hook_name ] ) ) {
foreach ( $wp_filter[ $hook_name ]->callbacks as $priority => $callbacks ) {
foreach ( $callbacks as $key => $callback ) {
if (
is_array( $callback['function'] )
&& is_object( $callback['function'][0] )
&& method_exists( $callback['function'][0], 'duplicate_css_class_with_original_id' )
) {
$object = $callback['function'][0];
if ( get_class( $object ) === 'WPML_Elementor_Adjust_Global_Widget_ID' ) {
remove_action( $hook_name, [ $object, 'duplicate_css_class_with_original_id' ], $priority );
}
}
}
}
}
}, 1000 );
We have still pending the issue with the images translation not working. Should I open another ticket, or we can work on this one?
Regards
|
 Bigul
|
Hello,
Thank you for the details. Our second-tier team is still working on this issue. However, I have a few follow-up questions to help us fully resolve the issues:
1) Have you applied the following code via a Code Snippets plugin or directly in the functions.php file of the child theme? I couldn't locate it on the staging site.
add_action( 'wp', function() {
$hook_name = 'elementor/frontend/the_content';
global $wp_filter;
if ( isset( $wp_filter[ $hook_name ] ) ) {
foreach ( $wp_filter[ $hook_name ]->callbacks as $priority => $callbacks ) {
foreach ( $callbacks as $key => $callback ) {
if (
is_array( $callback['function'] )
&& is_object( $callback['function'][0] )
&& method_exists( $callback['function'][0], 'duplicate_css_class_with_original_id' )
) {
$object = $callback['function'][0];
if ( get_class( $object ) === 'WPML_Elementor_Adjust_Global_Widget_ID' ) {
remove_action( $hook_name, [ $object, 'duplicate_css_class_with_original_id' ], $priority );
}
}
}
}
}
}, 1000 );
Also, the following posts are loading as expected when the Custom Product Layout is enabled.
hidden link
hidden link
2) Are the product variation issues also resolved after applying this fix?
3) We can continue discussing the image translation issue in the main ticket. Could you please share a screencast for easier follow-up? It will greatly help us in our internal discussions
https://wpml.org/forums/topic/attribute-not-appearing-for-translation/
Sorry, I am getting an “Invalid username/password” error while trying to log in to the VPN. Please check the attached image and let me know how to proceed.
--
Thanks!
Bigul
|
 xavierC-5
|
hi Bigul,
1/ I've applied the code via plugin.
2/ Yes, when applied this code, the problem with variations is resolved
3/ Ok, will send an screencast with the image problem to the main ticket.
Our server is really complicated to access. I made a copy of our test site on a server working via FTP and Cpanel so I can easily check these issues if are related to server/hosting.
Same issue on the new hosting but with the above mentioned code, the variation issue resolves. Let me know if you want me to grant access to the hosting (Cpanel and FTP).
I have a week free plan so need to be fast to check 😉
Regards
|
 Bigul
|
Hello,
Thank you for the details. We will wait for your feedback on Media Translation in the main ticket.
I have another round of testing after upgrading to the latest version of WPML (4.7.5). But the issue exists when the Product Variations Blank Page (ID: 94435) snippet is inactive. So, I will consult with our team about this and get back to you as soon as possible. Please wait.
Sorry for the late response because of the holidays.
--
Thanks!
Bigul
|
 xavierC-5
|
Hi Bigul,
Ok, thanks.
I'm looking forward to your feedback.
Regards,
Xavier
|
 xavierC-5
|
Hi Bigul,
Any update on this issue??
Thanks,
Xavier
|
 Bigul
|
Hi Xavier,
Sorry for the late response. We are still working on this.
The conflict appears to be related to a compatibility issue with the theme setting under Shop >> Variable Products >> AJAX Variation Threshold. The issue does not occur when the threshold value is set to less than 50.
We will get back to you as soon as possible. Thank you for your patience.
--
Thanks!
Bigul
|
 xavierC-5
|
Hi Bigul,
Thanks for the answer.
I'm looking forward to your reply when you come out with the solution.
Regards,
Xavier
|
 Bigul
|
Hi Xavier,
We conducted a detailed test on this case, and the blank screen issue appears to occur only on your server. It works as expected in our local environments and also when hosted on our Cloudways test server. Please check the following link for more details. The login credentials are the same as your site, and note that we used a copy of the site without images.
hidden link
We have found a workaround for this issue. It works as expected after adding the following code to the functions.php file of the WoodMart child theme. With this change, the products no longer show a blank screen even when the Code Snippet is inactive. Refer to the following screencast for more details.
hidden link
Please check it now and let us know your feedback.
--
Thanks!
Bigul
|
 xavierC-5
|
Hi Bigul,
Thanks for the feedback.
Unfortunately, the solution you are mentioning is not working.
You are sending me a test without ENABLING the single product page layout.
If I enable the Single Product Layout, it keeps returning a BLANK PAGE.
Please ENABLE the Page Layout on our Staging Site and see the result.
hidden link
From our side, it only works when I DISABLE the Page Layout or when I ENABLE the Code Snippet I shared with you before and can be found at the Code Snippets Plugin.
The final website and stagging website has been tested on 3 different servers over the last 3 months. All of them returned a blank page. So I have my doubts to think this is related to a server issue.
Also, what about the code I shared with you and works? If this is a server problem, I believe the code will not fix that, correct? This code is pointing directly to the WPML plugin.
Thanks again for the great support and help and hope to find a solution soon.
Regards,
Xavier
|
 Bigul
|
Hi Xavier,
Thank you for the feedback. We are only getting the expected results when Shop >> Variable Products >> AJAX Variation Threshold value is set as 30.
Please check the attached image and the following screencast for more details.
hidden link
Could you please check if the issue is still happening on your site now: hidden link
Also, one more request, could you verify if the same bug appears on our test site as well:
hidden link (The credentials are the same as your site).
--
Thanks!
Bigul
|
 xavierC-5
|
Hi Bigul,
Thanks for the fast reply.
1- Changing the AJAX Variation Threshold value to 30, it works on our test site!
But there is something really weird:
With the Ajax value set at 30 VAR -> the test product work even if we remove the php code:
add_filter( 'woocommerce_ajax_variation_threshold', '__return_false' );
But only work on 1 of the products, not the others.
Working Product with 5 variations:
hidden link
Not working product with 4 variations:
hidden link
Curious thing after I see that the Ajax Threshold value changed the outcome in different products. I did some tests and discover that If I set the Ajax threshold value to 1 VAR -> I can see all products correctly with no php code enabled.
2- On your test site, all is working well, with no bug. I see also that no matter what VAR threshold I use, all products work well on your server side.
I'm a bit lost now after discovering that with no Ajax threslhold, products show correctly.
Any feedback about it?
I'm not an IT or expert myself, so I don't really know what is the function of the Ajax threshold for this specific action.
Regards,
Xavier
|
 Bigul
|
Hi Xavier,
Thank you for the feedback. I have shared it with our team. We will check it further and get back to you as soon as possible. Please wait.
--
Thanks!
Bigul
|
 xavierC-5
|
Hi Bigul,
Thanks.
Waiting for your feedback.
Regards,
Xavier
|