Questo è il forum di assistenza tecnica di WPML, il plug-in multilingue di WordPress.
La sua lettura è permessa a tutti, ma la pubblicazione è riservata esclusivamente ai clienti di WPML. Il team di WPML risponde sul forum 6 giorni su 7, 22 ore su 24.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| - | 9:00 – 14:00 | 9:00 – 14:00 | 9:00 – 14:00 | 9:00 – 14:00 | 9:00 – 14:00 | - |
| - | 15:00 – 18:00 | 15:00 – 18:00 | 15:00 – 18:00 | 15:00 – 18:00 | 15:00 – 18:00 | - |
Fuso orario del supporto: Asia/Dhaka (GMT+06:00)
Questo ticket contiene 26 risposte, ha 1 voce.
Ultimo aggiornamento da jemalG 15 ora, 34 minuto fa.
Assistito da: Prosenjit Barman.
| Autore | Post |
|---|---|
| Gennaio 7, 2026 alle 8:13 am #17708443 | |
|
jemalG |
Hello WPML Support, I am experiencing a critical Fatal Error when trying to save or update a product in WooCommerce. The issue seems to be related to the woocommerce-multilingual plugin during the synchronization process. Symptoms: When I click "Update" or "Publish" on a product, the site crashes with the following error. Error Log: Fatal error: Uncaught Error: Array callback must have exactly two elements in /var/www/webroot/ROOT/wp-content/plugins/woocommerce-multilingual/classes/Synchronization/Component/Post.php:69 |
| Gennaio 7, 2026 alle 9:20 am #17708744 | |
|
jemalG |
I have important additional information regarding the Fatal Error Array callback must have exactly two elements. The error only occurs when an external plugin updates a custom field via API. We use a plugin called "Sirio WooSync" (connected to our ERP) that updates a specific custom field for Price Lists. The Workflow causing the crash: The ERP triggers an API update for a custom price field on a product. WooCommerce Multilingual tries to sync this change (managePostParent runs). The Fatal Error happens immediately, blocking the update. Environment: PHP: 8.3.24 (LiteSpeed) WooCommerce: 10.4.3 WCML: 5.5.3.1 External Plugin: Sirio WooSync v1.1.0 It seems WCML fails to handle the synchronization hook triggered by this specific API update under PHP 8.3 rules. Can you verify if WCML\Synchronization\Component\Post.php can be patched to handle this type of external update safely? |
| Gennaio 7, 2026 alle 10:54 am #17709097 | |
|
Prosenjit Barman Sostenitore di WPML dal 03/2023
Lingue: Inglese (English ) Fuso orario: Asia/Dhaka (GMT+06:00) |
Hello Jemal, Thanks for reaching out to WPML Support. I'm Prosenjit from the WPML Development Team, and I'll be happy to help you with this issue. I understand the problem and appreciate you providing such detailed information — it's very helpful for the investigation. Since you have a custom setup for updating products via API, I've conducted a preliminary code review based on the stack trace and the specific line where the error occurs. Here's what I found: At the line where the fatal error is triggered, the code is trying to call `$translationsLanguages` as a function using `$translationsLanguages($translationID)`. However, according to the method signature, `$translationsLanguages` is actually defined as an array parameter (`array<int, string> $translationsLanguages`), not a callable function. PHP 8.3 has stricter validation for array callbacks. When PHP encounters `$translationsLanguages($translationID)`, it interprets this as an attempt to use an array as a callback function. Since the array doesn't have exactly two elements in the expected callback format, it triggers the fatal error: "Array callback must have exactly two elements." Based on this preliminary investigation, the issue appears to be in how the code is calling this parameter. Given the method signature, could you please try updating the code as shown below and see if it resolves the issue? - Go to /wp-content/plugins/woocommerce-multilingual/classes/Synchronization/Component/, open Post.php and scroll to the line 69 $translationLanguage = $translationsLanguages[ $translationID ]; Important: Please make sure to take a full backup of your site before making any code changes. Please test the code update and let me know the results: - If the fix works: I'll escalate this internally and work to include the fix in the next WPML update so it's available for everyone. - If the issue persists: Please reach out, and I'll be happy to conduct a deeper investigation. Given the complexity of your custom API setup, there may be additional factors at play that we'll need to examine more closely. Either way, I'm here to help ensure this gets fully resolved for you. Looking forward to hearing how it goes! Best regards, |
| Gennaio 7, 2026 alle 1:09 pm #17709543 | |
|
jemalG |
Hi, for my version i dont see these /Synchronization/Component/ in classes, I tried to download the manual version of the plugin, but I cannot find that folder. |
| Gennaio 8, 2026 alle 3:39 am #17711139 | |
|
Prosenjit Barman Sostenitore di WPML dal 03/2023
Lingue: Inglese (English ) Fuso orario: Asia/Dhaka (GMT+06:00) |
Hi! Thank you for checking and getting back to me. I've just verified the same version you're using (5.5.3.1), and I can confirm that the folder structure does exist in that version. Additionally, since the stack trace explicitly shows this file path and filename in the error message, the file must be present in your installation — the error couldn't reference it otherwise. Could you please access your site's file system using either FTP or your hosting control panel's File Manager and then check again? Path: `wp-content/plugins/woocommerce-multilingual/classes/Synchronization/Component/` If you find that the file is indeed missing, I'd recommend: However, before we proceed with any of these steps, please let me know what you find when you check the file system. This will help us determine the best course of action. Let me know, please! I'm here to guide you through each step if needed! Best regards, |
| Gennaio 12, 2026 alle 6:51 am #17720083 | |
|
jemalG |
Good morning, unfortunately the change made has not had any effect. Any other solutions? |
| Gennaio 13, 2026 alle 3:52 am #17723491 | |
|
Prosenjit Barman Sostenitore di WPML dal 03/2023
Lingue: Inglese (English ) Fuso orario: Asia/Dhaka (GMT+06:00) |
Hi! Thank you for trying the solution I provided. I appreciate you taking the time to test it and reporting back. Since the issue persists even after the code adjustment, this indicates we need to investigate more deeply to identify and address the root cause properly. You mentioned that this error occurs specifically when an external plugin updates a custom field via API. To provide you with the most effective solution, I need to understand exactly how this process works, as I'm not familiar with the specific external plugin you're using. To replicate the issue accurately and identify the root cause, I'll need: 1. Access to your site - This will allow me to: 2. Understanding the workflow - If possible, could you provide: Having this context will enable me to replicate the exact scenario and see firsthand what's happening, which is crucial for working on a reliable, permanent solution. I've enabled the private fields below so you can securely share your site credentials with me. Please be assured that: - Your access information is 100% secure and encrypted I'm personally committed to getting this resolved for you. Once I have access and understand the complete workflow, I'll be able to provide a targeted, permanent fix rather than a workaround. Please share the access details when you're ready, and if you have any questions or concerns before doing so, don't hesitate to ask. Looking forward to resolving this for you! Best regards, |
| Gennaio 13, 2026 alle 8:33 am #17723900 | |
|
Prosenjit Barman Sostenitore di WPML dal 03/2023
Lingue: Inglese (English ) Fuso orario: Asia/Dhaka (GMT+06:00) |
Hi, Thank you so much for sharing the access — I was able to log in successfully and access your backend. I want to make absolutely sure I'm troubleshooting this in the safest and most effective way possible. As you mentioned in your previous message:
Since your site is live in production and serving your customers, I want to be extremely cautious with any testing or troubleshooting I perform. To ensure I'm working on the exact scenario that triggers the error, could you please provide some info on: 1. How to trigger the error: 2. Configuration details: Having this precise information will allow me to: - Focus my investigation on the exact code path that's causing the issue I completely understand this might seem like a lot to document, but this careful approach is specifically designed to protect your production site while ensuring I can identify and fix the root cause accurately. Once I have this information, I'll be able to investigate confidently and provide you with a reliable, tested solution. Please share whatever details you can, and if you're able to provide a brief screen recording showing the process, that would be incredibly helpful as well. Thank you for your understanding and cooperation! Best regards, |
| Gennaio 13, 2026 alle 8:52 am #17723955 | |
|
Prosenjit Barman Sostenitore di WPML dal 03/2023
Lingue: Inglese (English ) Fuso orario: Asia/Dhaka (GMT+06:00) |
Hi again, I wanted to follow up with an important update based on my investigation. Shortly after my previous message, I continued my investigation using the FTP access you provided. I examined your site's debug log and found something important: The original fatal error you reported in this ticket was last logged on January 7th. I don't see any instances of that specific error occurring after that date. 1. After updating the code I provided, have you triggered the custom field update via the external plugin's API? 2. If you've encountered a fatal error since then, is it the same error you originally reported in this ticket, or is it a different one? To try to replicate the issue, I went to WooCommerce → Sirio WooSync, selected a product, and clicked the "Start Sync" button. This did trigger a fatal error, but when I checked the debug log, I found: - The error is different from the original one you reported Could you please verify: 1. Whether the replication process I followed (using Sirio WooSync → Start Sync) is the correct way to trigger the error you're experiencing It's possible that: Understanding exactly which error you're currently facing will help me provide you with the most accurate solution. Please let me know these details, and I'll continue investigating to ensure everything is working correctly for you. Looking forward to your confirmation! Best regards, |
| Gennaio 13, 2026 alle 9:38 am #17724208 | |
|
jemalG |
Hi, You were right. I checked the logs and confirmed that the Fatal Error is indeed different now. It is a Call to a member function get_id() on false originating strictly from the sirio-woosync.php file. It seems the external plugin is trying to access a product object that doesn't exist (or returns false) during the sync, possibly due to a missing translation look-up, and crashing because it lacks error handling. I will contact the Sirio developers to fix this bug in their code. You can keep this ticket open for a few days just in case the Sirio devs say it's caused by a "WPML hook returning false", but for now, the ball is in their court. Thanks for the analysis. |
| Gennaio 14, 2026 alle 3:30 am #17727720 | |
|
Prosenjit Barman Sostenitore di WPML dal 03/2023
Lingue: Inglese (English ) Fuso orario: Asia/Dhaka (GMT+06:00) |
Hi, Thank you so much for confirming that and for taking the time to investigate the logs on your end as well! I'm glad we were able to confirm that the original fatal error you reported in this ticket has been resolved. The code fix I provided appears to have successfully addressed that specific issue with the WooCommerce Multilingual plugin. You're absolutely right in your analysis — the current error is originating from the Sirio WooSync plugin itself. This is definitely something the Sirio developers will need to address in their code, as it's a bug in how their plugin handles cases where a product object might not exist or be available. I'm more than happy to keep this ticket open for a few days as you suggested. If the Sirio developers indicate that the issue is related to a WPML hook returning `false` or any other WPML-related behavior, please don't hesitate to reach out. I'll be here and ready to investigate further from our side if needed. I'll monitor this ticket, so if anything comes up or if the Sirio team points to something on the WPML side, just update this ticket and I'll jump right back in to assist you. Thank you for your patience throughout this investigation. Best regards, |
| Gennaio 19, 2026 alle 8:57 am #17741389 | |
|
jemalG |
Critical Fatal Error: Uncaught TypeError in UpdateHandler (Server crash / 503 loop) Hi WPML Support Team, I am opening this ticket because we are experiencing a critical, intermittent issue on our production server that brings the entire site down. The Symptoms: Every now and then, the website crashes with a specific Fatal Error related to WPML's internal classes. When this happens, the site becomes inaccessible. Simply restarting the PHP service results in a 503 Service Unavailable error. The only way to restore the website is to perform a full hard reboot of the server. The Error: The error log points to a type mismatch in the UpdateHandler constructor within the vendor folder of WPML: Fatal error: Uncaught TypeError: WPML\UserInterface\Web\Infrastructure\CompositionRoot\Config\Updates\UpdateHandler::__construct(): Argument #1 ($api) must be of type WPML\UserInterface\Web\Infrastructure\CompositionRoot\Config\ApiInterface, WPML\UserInterface\Web\Infrastructure\WordPress\CompositionRoot\Config\Api given, called in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/wpml.php on line 50 Our Environment: We are running on a high-performance server (likely using OPcache/Litespeed or Nginx). The error seems to suggest a class loading issue or an OPcache corruption where the Interface and the Class Api are mismatched in memory. Questions: Is this a known issue with the current version of WPML? Is there a specific folder we should exclude from OPcache or Object Cache to prevent this class mismatch? Could this be caused by a corrupted update of the plugin files? We need a permanent solution as we cannot afford to reboot the server periodically to clear this state. Looking forward to your urgent assistance. Best regards, |
| Gennaio 19, 2026 alle 9:01 am #17741435 | |
|
jemalG |
Fatal error: Uncaught TypeError: WPML\UserInterface\Web\Infrastructure\CompositionRoot\Config\Updates\UpdateHandler::__construct(): Argument #1 ($api) must be of type WPML\UserInterface\Web\Infrastructure\CompositionRoot\Config\ApiInterface, WPML\UserInterface\Web\Infrastructure\WordPress\CompositionRoot\Config\Api given, called in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/wpml.php on line 50 and defined in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/UserInterface/Web/Infrastructure/CompositionRoot/Config/Updates/UpdateHandler.php:27 Stack trace: #0 /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/wpml.php(50): WPML\UserInterface\Web\Infrastructure\CompositionRoot\Config\Updates\UpdateHandler->__construct() #1 /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/sitepress.php(77): require_once('...') #2 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(341): {closure}() #3 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters() #4 /var/www/webroot/ROOT/wp-includes/plugin.php(522): WP_Hook->do_action() #5 /var/www/webroot/ROOT/wp-settings.php(593): do_action() #6 /var/www/webroot/ROOT/wp-config.php(115): require_once('...') #7 /var/www/webroot/ROOT/wp-load.php(50): require_once('...') #8 /var/www/webroot/ROOT/wp-login.php(12): require('...') #9 {main} thrown in /var/www/webroot/ROOT/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/UserInterface/Web/Infrastructure/CompositionRoot/Config/Updates/UpdateHandler.php on line 27 |
| Gennaio 20, 2026 alle 3:54 am #17744501 | |
|
Prosenjit Barman Sostenitore di WPML dal 03/2023
Lingue: Inglese (English ) Fuso orario: Asia/Dhaka (GMT+06:00) |
Hi Jemal, Thank you for providing such detailed information about this critical issue. I completely understand the severity of the situation — having your production site go down intermittently and requiring full server reboots is absolutely unacceptable. However, the issue now seems to be different than the issue reported initially in this ticket. Based on the error log you've shared, this appears to be a type mismatch issue where: Since this is an intermittent issue that requires specific conditions to trigger, I need some critical information to replicate and resolve it properly: - Can you identify any pattern to when this happens? - When was the last time this occurred? - Are there any specific actions or workflows that seem to trigger it? Have you identified any steps that consistently reproduce this error? If so, could you please share the exact sequence? Being able to replicate the issue is essential for proper debugging and for identifying an effective solution. This is a critical issue that requires urgent resolution, and I'm treating it as a top priority. The information you provide will be crucial in helping me give you a reliable, permanent solution rather than band-aid fixes. I’m standing by to assist you with resolving this issue. Please share any details you have, including the steps mentioned above, so we can properly understand and replicate the problem, and we'll work together to fix this once and for all. Best regards, |
| Gennaio 20, 2026 alle 7:02 am #17744697 | |
|
jemalG |
Hi Prosenjit, Thank you for your prompt response and for prioritizing this critical issue. I really appreciate your technical expertise on this matter. Regarding your questions, we have indeed identified a specific pattern: 1. The Trigger: Automatic Translations We have noticed that the crash usually occurs shortly after we launch a batch of Automatic Translations. It doesn't always happen immediately, but often during or right after the background processing of these translations. 2. Database History (Crucial Context) You mentioned a possible "Type Mismatch." It is important for you to know that in the past, we had issues with database table corruption. We previously used WPML troubleshooting tools (cleanup/repair) to fix them. We suspect there might still be some corrupted data or "orphan" rows in the WPML tables that trigger this fatal error when the UpdateHandler tries to process the new translations. 3. The Severity When this error triggers, the site goes into a 503 Service Unavailable loop. Restarting PHP is not enough; we are forced to perform a full hard reboot of the server to get the site back online. Given this context, could this be related to a scheduled task (Cron Job) that runs after translations are added? Please let me know if you need administrative access (staging or prod) to inspect the database integrity or the logs directly. We trust your judgment to fix this once and for all. Best regards, |