Home › Forums › WoodMart support forum › Assistance Needed with Translation Issue on Single Product Layout
Assistance Needed with Translation Issue on Single Product Layout
- This topic has 11 replies, 2 voices, and was last updated 3 weeks, 6 days ago by Luke Nielsen.
-
AuthorPosts
-
October 16, 2024 at 6:45 pm #605560
DaveParticipantDear Woodmart Support Team,
I am encountering an issue with my website related to the translation of a Single Product Layout. After completing a translation to 100% using WPML, the translation status does not update, and the gear icon remains instead of showing completion. Furthermore, I am unable to edit the French and German translations of the layout. When I try to make these translations independent from the original English version and edit them, I encounter a critical error:
“There has been a critical error on your website. Please check your site admin email inbox for instructions.”
WPML Support provided the following information to me:
In the ATE error logs, we were able to locate this error:
Call to a member function get_gallery_image_ids() on null /home/u160632271/domains/gisoojewels.ch/public_html/wp-content/themes/woodmart/woocommerce/single-product/product-image.php:27
This points to a known issue with Woodmart and Product layouts, which is documented here:
Woodmart Fatal Error When Translating Product Layouts
Please contact Woodmart support and provide them with this error. Their team should know how to resolve it, as the issue resides in their code. We had another client who resolved this issue with Woodmart’s help.Could you please assist me in resolving this issue with the translation status and critical error? Any guidance from your team would be greatly appreciated.
Thank you in advance for your support. I look forward to your assistance.
Best regards,
DaveAttachments:
You must be logged in to view attached files.October 17, 2024 at 9:44 am #605686
Luke NielsenKeymasterHello,
Navigate to Theme Settings -> Single product -> assign the relevant product here – https://take.ms/MTV6m
Clear the cache and recheck the issue.
Kind Regards
October 17, 2024 at 12:42 pm #605743
DaveParticipantDear Luke,
Thank you for your response. I followed your instructions. However, after clearing the cache, the issue persists. The translation status still does not update to 100%, and the gear icon remains active.
Could you please advise on the next steps to resolve this?
Thank you for your help.
Best regards,
DaveAttachments:
You must be logged in to view attached files.October 17, 2024 at 12:45 pm #605747
Luke NielsenKeymasterHello,
Does it happen only in Layouts or with pages too?
Thank you for your patience.
Kind Regards
October 17, 2024 at 12:51 pm #605748
DaveParticipantHi,
I just tested this with a new page in the Pages, and the same issue persists—translation status does not update, and the gear icon remains. Please see the attached screenshot.
Thank you for your help.
Best regards,
DaveAttachments:
You must be logged in to view attached files.October 17, 2024 at 4:34 pm #605841
Luke NielsenKeymasterHello,
Okay, in this case, could you please check how it works on the default WooCommerce Storefront theme?
Looking forward to collaborating with you!
Kind Regards
October 17, 2024 at 4:55 pm #605847
DaveParticipantHi Luke,
Before switching to the WooCommerce Storefront theme, I checked the pages again, and after several hours, the test page showed the correct translation status (pencil icon) (Screenshot 1). However, there was still no progress with the layout (Screenshot 2).
When I switched to WooCommerce Storefront, the layout issue was resolved (Screenshot 3). But after returning to Woodmart and making some translation changes, the gear icons reappeared (Screenshot 2 again).
Looking forward to your guidance on how to proceed.
Best regards,
DaveAttachments:
You must be logged in to view attached files.October 21, 2024 at 9:15 am #606350
Luke NielsenKeymasterHello,
I apologize for the delay.
May I disable some 3rd party plugins for testing?
Thank you in advance.
Kind Regards
October 21, 2024 at 12:21 pm #606461
DaveParticipantDear Luke,
Yes. I have a fresh backup in place.
Thank you for your help.
Best regards,
DaveOctober 23, 2024 at 9:40 am #606974
Luke NielsenKeymasterHello,
Add the below code to the fucntions.php file in your child theme:
add_action( 'woocommerce_before_template_part', function () { global $product; if ( wp_is_json_request() && ! $product ) { $random_product = new WP_Query( array( 'posts_per_page' => '1', 'post_type' => 'product', ) ); while ( $random_product->have_posts() ) { $random_product->the_post(); $product_id = get_the_ID(); } wp_reset_postdata(); $product = wc_get_product( $product_id) ; } } );
Clear the cache and recheck the issue.
Kind Regards
October 23, 2024 at 12:44 pm #607061
DaveParticipantDear Luke,
Thank you for the provided solution. I implemented the code, and I’m happy to report that it has fixed the problem with the translation status, both for the layouts and the pages.
I appreciate your support in resolving this issue!
Best regards,
DaveOctober 23, 2024 at 12:48 pm #607062
Luke NielsenKeymasterHello,
You are welcome. Always remember that you can reach out to us with any questions you may have.
Have a good day!
Kind Regards
-
AuthorPosts
The topic ‘Assistance Needed with Translation Issue on Single Product Layout’ is closed to new replies.
- You must be logged in to create new topics. Login / Register