Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
After updating a WooCommerce site to WordPress 6.9 and WPML to 4.8.6, activating WPML caused a critical error. The client identified the issue was due to old custom code in the child theme's functions.php, which modified shipping methods without checking if the shipping rate set actually existed.
Solution:
We recommended the client to perform several troubleshooting steps in WPML:
1. Clear the cache in WPML
2. Remove ghost entries from the translation tables
3. Fix element_type collation
4. Fix WPML tables collation
5. Set language information
6. Fix post type assignment for translations
Additionally, we advised checking if the current theme includes its own caching mechanism and to clear it, and to review the theme’s taxonomy terms for correctness.

The client has found that the old custom code in functions.php on the child theme is causing this problem.

If this solution does not resolve your issue, or if it seems outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

0% of people find this useful.

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 5 replies, has 0 voices.

Last updated by Andrey 5 months, 1 week ago.

Assisted by: Andrey.

Author Posts
December 3, 2025 at 5:30 pm #17631891

gertV-13

URL -> hidden link (license not under my account)
I updated a Woocommerce site today to WordPress 6.9, I updated WPML to 4.8.6 as per the instruction I received from WPML per mail.
Now WPML is causing a critical error on the site upon activation. I have narrowed it down to WPML after disabling EVERY plugin besides Woocommerce and reverting to the Storefront theme. However, the debug log does not throw any clear exception.

December 3, 2025 at 6:36 pm #17632058

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

Could you please share a screenshot showing where exactly you see the critical error?

If a critical error occurs, a fatal error should appear in the debug.log file.
Please try the following:
1. Delete the existing debug.log file from /wp-content/.
2. Reproduce the issue.
3. Check whether a new debug.log file has been generated and share its contents with us.

December 4, 2025 at 9:19 am #17633150

gertV-13

I can;'t share a text file here.
The issue happens on every visitor facing page (so even the homepage), as soon as I activate.
These are the last lines of debug.log:
[04-Dec-2025 09:16:11 UTC] PHP Deprecated: WPML_ST_Verify_Dependencies::verify_wpml(): Implicitly marking parameter $dependenciesFilepath as nullable is deprecated, the explicit nullable type must be used instead in /home/sundar/htdocs/sundar.be/wp-content/plugins/wpml-string-translation/classes/class-wpml-st-verify-dependencies.php on line 15
[04-Dec-2025 09:16:11 UTC] PHP Deprecated: WPML\Core\Component\Translation\Domain\Settings\Settings::__construct(): Implicitly marking parameter $reviewMode as nullable is deprecated, the explicit nullable type must be used instead in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Core/Component/Translation/Domain/Settings/Settings.php on line 25
[04-Dec-2025 09:16:11 UTC] PHP Deprecated: WPML\Core\Component\Translation\Domain\Settings\Settings::__construct(): Implicitly marking parameter $translationEditor as nullable is deprecated, the explicit nullable type must be used instead in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Core/Component/Translation/Domain/Settings/Settings.php on line 25
[04-Dec-2025 09:16:11 UTC] PHP Deprecated: WPML\Core\Component\Translation\Domain\Settings\Settings::enableTranslateEverything(): Implicitly marking parameter $reviewMode as nullable is deprecated, the explicit nullable type must be used instead in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Core/Component/Translation/Domain/Settings/Settings.php on line 78
[04-Dec-2025 09:16:11 UTC] PHP Deprecated: WPML\Core\Component\Translation\Domain\Settings\Settings::enableTranslateEverything(): Implicitly marking parameter $translationEditor as nullable is deprecated, the explicit nullable type must be used instead in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Core/Component/Translation/Domain/Settings/Settings.php on line 78
[04-Dec-2025 09:16:11 UTC] PHP Deprecated: WPML\Core\Component\Translation\Domain\Links\HandleUpdateTranslation::adjustOnlyOnce(): Implicitly marking parameter $triggerItem as nullable is deprecated, the explicit nullable type must be used instead in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Core/Component/Translation/Domain/Links/HandleUpdateTranslation.php on line 75
[04-Dec-2025 09:16:11 UTC] PHP Deprecated: WPML\Legacy\Component\Translation\Domain\Links\AdjustLinks::adjust(): Implicitly marking parameter $triggerItem as nullable is deprecated, the explicit nullable type must be used instead in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Legacy/Component/Translation/Domain/Links/AdjustLinks.php on line 22
[04-Dec-2025 09:16:11 UTC] PHP Deprecated: WPML\Legacy\Component\Translation\Domain\Links\AdjustLinks::adjustLinksInStringTranslations(): Implicitly marking parameter $triggerItem as nullable is deprecated, the explicit nullable type must be used instead in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Legacy/Component/Translation/Domain/Links/AdjustLinks.php on line 76
[04-Dec-2025 09:16:11 UTC] PHP Deprecated: WPML\Legacy\Component\Translation\Domain\Links\AdjustLinks::revertNameInTranslatedLinks(): Implicitly marking parameter $triggerItem as nullable is deprecated, the explicit nullable type must be used instead in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Legacy/Component/Translation/Domain/Links/AdjustLinks.php on line 127
[04-Dec-2025 09:16:11 UTC] PHP Deprecated: WPML\Core\Component\Translation\Domain\Links\AdjustLinksInterface::adjust(): Implicitly marking parameter $triggerItem as nullable is deprecated, the explicit nullable type must be used instead in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Core/Component/Translation/Domain/Links/AdjustLinksInterface.php on line 12

HOWEVER, If I filter on fatal, some more interesting things pop up:

[04-Dec-2025 09:15:47 UTC] PHP Fatal error: Uncaught TypeError: WPML_Term_Element::__construct(): Argument #4 ($wpml_cache) must be of type WPML_WP_Cache, null given, called in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php on line 45 and defined in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-term-element.php:18
[04-Dec-2025 09:15:52 UTC] PHP Fatal error: Uncaught TypeError: WPML_Term_Element::__construct(): Argument #4 ($wpml_cache) must be of type WPML_WP_Cache, null given, called in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php on line 45 and defined in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-term-element.php:18
[04-Dec-2025 09:15:54 UTC] PHP Fatal error: Uncaught TypeError: WPML_Term_Element::__construct(): Argument #4 ($wpml_cache) must be of type WPML_WP_Cache, null given, called in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php on line 45 and defined in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-term-element.php:18

December 4, 2025 at 11:33 am #17633779

gertV-13

I've narrowed it down to the theme: Riode.
However, still can't find the actual critical error causing this.

December 4, 2025 at 12:23 pm #17634096

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback.

Here is the error you shared:

[04-Dec-2025 09:15:47 UTC] PHP Fatal error: Uncaught TypeError: WPML_Term_Element::__construct(): Argument #4 ($wpml_cache) must be of type WPML_WP_Cache, null given, called in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php on line 45 and defined in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-term-element.php:18
[04-Dec-2025 09:15:52 UTC] PHP Fatal error: Uncaught TypeError: WPML_Term_Element::__construct(): Argument #4 ($wpml_cache) must be of type WPML_WP_Cache, null given, called in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php on line 45 and defined in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-term-element.php:18
[04-Dec-2025 09:15:54 UTC] PHP Fatal error: Uncaught TypeError: WPML_Term_Element::__construct(): Argument #4 ($wpml_cache) must be of type WPML_WP_Cache, null given, called in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php on line 45 and defined in /home/sundar/htdocs/sundar.be/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-term-element.php:18

Can you try to go to WPML → Support → Troubleshooting and run the following options?

- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Fix WPML tables collation
- Set language information
- Fix post type assignment for translations

Additionally, please check the following:
- Does your current theme include its own caching mechanism? If so, clear it.
- Review your theme’s taxonomy terms to ensure they exist correctly and nothing appears unusual or corrupted.

I would also like to mention that the Riode theme is not compatible with WPML. According to our internal records, the theme author has not responded to our attempts to collaborate on resolving the compatibility issues that have been reported.

December 4, 2025 at 1:28 pm #17634481

gertV-13

Thanks for the feedback. Yes Riode isn't really the best theme to play nice with WPML, although it works for the most part (I didn't create this site myself).
However in this instance the fault was my own - turns out I had some old custom code running in the child theme's functions.php modifying shipping methods, the store owner however modified those shipping methods and this ended up causing a null value exception further down the line in the translation stack of WPML, because this old custom code didn't check if the shipping rate set actually existed. The lack of a proper stacktrace let me to believe the issue was something caused by WPML and or Riode after the update.
Thanks for your support!

December 4, 2025 at 1:40 pm #17634550

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for the updates.

It's a good catch! I am glad that it works now.

Have a nice week.