[Resolved] When product category is saved website times out
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing a timeout error when updating product categories with translations on your website, and this issue only occurs when the sitepress-multilingual-cms plugin is active, it might be due to a plugin conflict.
Solution: We recommend following these steps to identify and resolve the issue: 1) Ensure you take a full backup of your site and database. It's advisable to perform these tests on a development or staging site. 2) Enable debugging on your site to log errors. Details on how to do this can be found at https://wpml.org/documentation/support/debugging-wpml/. 3) Deactivate all plugins except for WPML, String Translation, WooCommerce, and WCML. 4) Switch to a standard theme like 2024 or 2021. 5) Check if the issue persists. If not, reactivate plugins one by one to identify the conflicting plugin. 6) If the issue does not reoccur after all plugins are activated, switch back to your original theme to check for theme conflicts.
If this solution does not resolve your issue or seems outdated, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. We highly recommend opening a new support ticket at WPML support forum for further assistance.
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.
Background of the issue:
I am trying to update product categories that have translations on my website. When I do this, I encounter a timeout error. I have contacted my hosting support team, and they identified the issue as being related to the sitepress-multilingual-cms plugin. The problem does not occur when the plugin is deactivated. The error only happens in the backend, and sometimes it deactivates some plugins that I have to activate manually. Here is the link to a page where the issue can be seen: hidden link
Symptoms:
When updating any product category with translations, I get a timeout error. The error only occurs in the backend, and sometimes it deactivates some plugins that I have to activate manually. I expected the page to load normally after saving, but instead, I got a timeout error message.
Questions:
Why does updating product categories with translations cause a timeout error?
How can I prevent the timeout error when using the sitepress-multilingual-cms plugin?
It is good that you've tested without WPML but can you please try in a minimal setup, following these steps?
Take a full backup of your site and database before proceeding. It is highly advised to try these on a dev or staging site first, so your live site isn't compromised.
1) Enable debugging in your site. See https://wpml.org/documentation/support/debugging-wpml/ for details. This will log the errors in the debug.log file which you can upload somewhere (i.e. hidden link) and share the download link for investigation.
2) Deactivate all plugins except WPML, String Translation, WooCommerce and WCML.
3) Switch to a standard theme like 2024 or 2021.
4) Check for the issue if it still happens.
5) Then start activating plugins one by one while keep checking for the issue. This way you 'll be able to pinpoint a conflict when & where it starts creating the problem.
6) If after activating all plugins you see that it still works fine, then switch to your theme and see if that's causing it.
Thank you for the debug log, it only contains notices coming from other plugins.
I need to take a closer look at your site. So I request temporary access (WP-Admin and FTP), preferably to a test site where the problem has been replicated.
Your next answer will be private, to share this information safely.
Also provide detailed steps to reproduce the issue and links to pages in the admin and on the frontend.
IMPORTANT: Please take a complete backup of the site to avoid data loss. I may need to activate/deactivate plugins also.
Thank you for the access, I took a quick look in the WP Admin and noted the followings:
- There are several active plugins which are outdated (including ACF Pro).
- Some plugins are throwing some PHP notices and deprecated messages (i.e. Max Mega Menu and Premmerce Permalink Manager for WooCommerce).
- The plugin mentioned in previous point are not WPML compatible, as well as, some other plugins may also not be compatible.
- Parent theme is outdated, while child theme is heavily customized. Please note that support for custom coding is out of scope of this forum.
- Several custom rules have been added to your .htaccess file.
I couldn't find any fatal or critical error in the logs, so the said issue is most likely due to a conflict, arising due to any (or more) of the above mentioned.
Unfortunately I'll not be able to debug at the prescribed time (after 6pm UK time) which is midnight or late for me. So I'll need a site which is "most preferably" not a live site and can be examined at anytime, without compromising data and traffic. This is also necessary for later investigations (if needed) by our team (who may also not comply with the prescribed hours).
Please note that I haven't changed anything in the site, except, adding a Debug Log Manager and a File Manager plugin, to examine the error log and the .htaccess file.
I'll recommend copying the same live site to a test/staging site and provide the necessary access. So I can then debug it accordingly. I understand that you mentioned that issue didn't happen in your previous staging site, however if you can prepare the staging site on the same server, there are chances it is reproducible.
We do have a staging site on the same server with the same setup, and the error is not replicated.
This is only happening when saving product categories that have translated categories, so we suspect that the problem is related to WPML.
Because this is not replicable on a staging site, I will permit for this to be done on the production site, but we have to arrange a time for this to be done so I can inform the client that the website will go on maintenance while you do the test you need
Sure I can try on this site with your permissions. I'm at GMT+05:00. Currently I'm about to close in an hour or so, followed by the weekend. My work hours are from 9am to 6am (GMT+5) and I'll be able to attend on Monday.
In the meanwhile, please try the following in the site having the issues (during a suitable time):
Take a full backup of your site and database before proceeding. It is highly advised to try these on a dev or staging site first, so your live site isn't compromised.
1) Update plugins and theme (including parent theme) to the latest versions.
2) Deactivate all plugins except WPML and String Translation.
3) Switch to a standard theme like 2024 or 2021.
4) Check for the issue if it still happens.
5) Then start activating plugins one by one while keep checking for the issue. This way you 'll be able to pinpoint a conflict when & where it starts creating the problem.
6) If after activating all plugins you see that it still works fine, then switch to your theme and see if that's causing it.
Please let me know your findings and a suitable time on Monday during my work hours (as mentioned above).
Apologies for taking so long to reply to you here.
I have talked to my line manager and with the client, and we will perform the work you recommended on the 1st of September.
I will make sure to have the debug log on to register everything we do, and I can send you afterwards so you can analyse it. Hopefully, it will tell us more about what is happening.
Is there anything else you want me to try and do on the day?