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 11 replies, has 2 voices.

Last updated by sejinL 9 months ago.

Assisted by: Prosenjit Barman.

Author Posts
July 12, 2023 at 4:31 am #14018601

sejinL

Clicking on the link to English translation from the list of Japanese articles or from an article page leads to the attached error screen. This issue occurs only for some articles, not all. The screen corresponds to the article with [post_id: 592].

hidden link

スクリーンショット 2023-07-12 13.25.50.png
スクリーンショット 2023-07-12 13.22.57.png
July 12, 2023 at 12:38 pm #14024063

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thanks for contacting WPML Support. I will be glad to assist you in this matter.

I understood the issue you're having. This issue usually occurs because of not setting up a WPML table in the database correctly. Can you please try the solution given in the answer below?

- https://wpml.org/forums/topic/critical-error-when-saving-translations/#post-11385113

I hope it will help. Make sure to clear the caches completely before checking.

If that doesn't solve the issue, please let me know with the link to the page where you're seeing the error. I will check and let you know about the next steps.

Best Regards,
Prosenjit

July 13, 2023 at 1:32 am #14028681

sejinL

Thank you for your reply.
I have checked and confirmed that the rid exists and AUTOINCREMENT is set.
I will send you the URL of the page where the error occurred, so please take a look.

URL: hidden link

スクリーンショット 2023-07-13 10.32.22.png
July 14, 2023 at 3:39 am #14037065

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thanks for trying out the suggestions.

It seems you've shared a protected link that can't be accessed without access. As the issue persists, a closer inspection will require to identify the root cause of the issue. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please make a backup of site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Looking forward to your response.

Best Regards,
Prosenjit

July 18, 2023 at 3:21 am #14054059

sejinL

I know you are working on it now, but it is a production environment and the display is very broken.
If the investigation and response time will take a large amount of time, we would like to have it returned to its original state.

July 18, 2023 at 4:03 am #14054121

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
I hope you're doing well.

Sorry for the delay in getting back to you. I was not available during the weekend which caused the delay. However, I assure you that I will now prioritize your ticket and respond to your ticket promptly.

I was investigating whether any plugins or themes were causing the issue. But I have now restored everything to its original state. As a result, the site should be displaying normally again.

In order to further debug the issue, I have created a package of your site and will proceed to set it up on our local server. This will allow for more in-depth investigation and troubleshooting. I will surely let you know as soon as I have more updates on this matter.

I appreciate your patience and kind cooperation in this matter.

Best Regards,
Prosenjit

July 18, 2023 at 5:14 am #14054329

sejinL

I have checked most of the layout fixes, but all of the eye catchers for the English custom post types are not showing up. Is it possible to fix this?

スクリーンショット 2023-07-18 14.12.31.png
July 19, 2023 at 4:52 am #14062487

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,

I've checked and can see that image is showing perfectly in 2 posts on the interview post type. Kindly be informed that no changes were made during the investigation on the interview post type. I was working on a specific article[post_id: 592] the entire time.

If the issue is occurring from the beginning, then it will be better if you could create a new ticket by mentioning the issue, as we're allowed to discuss one issue per thread. Our support team will be more than happy to assist you with that issue.

However, while checking, I also noticed that if I just resave the translated post, the thumbnail start to show properly in the English post. Please check this video(hidden link) for a better understanding.

Maybe the custom field to upload the thumbnail image isn't configured correctly in the code to display the thumbnail properly in the secondary language. If you want, you can follow the steps mentioned in the video to solve the issue. I hope you can understand.

Kindly be informed that We are still investigating the fatal error that occurred when updating the translation of a specific post. As soon as I have any update, I will surely let you know. Thank you for your patience.

Best Regards,
Prosenjit

July 20, 2023 at 3:45 am #14069051

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,

I would like to inform you that the issue you encountered while adding the translation has been escalated to our 2nd tier team for further investigation. Rest assured that I will keep you updated about any progress on this matter.

I appreciate your patience and understanding on this matter.

Best regards,
Prosenjit

July 20, 2023 at 4:40 am #14069095

sejinL

Hello, prosenjit.

Thank you for your reply.
We look forward to hearing good news from you.

Please continue your investigation.

July 31, 2023 at 4:42 am #14123649

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
I hope you're doing well.

Our 2nd tier team conducted a thorough investigation and has successfully been able to identify the root cause of the issue. The issue was happening due to a code that truncates the title based on the column length of DB but due to the mismatch of collation, the length is not calculated correctly.

Currently, the most optimal solution for resolving the problem is to slightly shorten the title of the post. For instance, remove this part (hidden link) from the title of post 592, save the changes, and try to translate the post. The fatal error will not appear again.

But, if it is not possible to shorten the post title, then please proceed with the other solution mentioned below.
1. From your WordPress dashboard, go to "Plugins > Plugin File Editor"
2. Select the "WPML Multilingual CMS" plugin
3. Now, go to this folder "/inc/translation-jobs/helpers/" and open wpml-update-translation-data-action.class.php file.
4. Go to the 70th line and replace this line:

$translate_job_insert_data['title'] = mb_substr( $translation_package['title'], 0, 160 );

with this:

$translate_job_insert_data['title'] = mb_substr( $translation_package['title'], 0, 160, defined('DB_CHARSET') ? DB_CHARSET : null );

Please note that the workaround uses the encoding from WP constant, please make sure that DB_CHARSET (in wp-config.php) matches the actual DB characters set, in case the workaround does not work.

Please try and let me know if that helps or if you need further assistance in this matter. I will be happy to help.

Best Regards,
Prosenjit

July 31, 2023 at 8:58 am #14124971

sejinL

Hello.
I was able to eliminate the error by reducing the number of characters in the title.
I decided to go with this solution for now as I don't want to touch the core files as much as possible.
Thank you for identifying the cause of the problem.

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