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 1 reply, has 2 voices.

Last updated by Prosenjit Barman 1 year, 9 months ago.

Assisted by: Prosenjit Barman.

Author Posts
August 31, 2023 at 6:50 pm #14323113

reneC-4

I am trying to: Configure a plugin calls Smush Pro. Tha plugin performs an ajax request and that request triggers an error when I see the logs the error below is shown.

Link to a page where the issue can be seen: It is in the admin panel.

I expected to see: No errors:

Instead, I got: This error, see this video for more information: hidden link

Uncaught TypeError: WPML\User\UsersByCapsRepository::__construct(): Argument #2 ($languagePairs) must be of type WPML\User\LanguagePairs\ILanguagePairs, WPML_Language_Pair_Records given, called in /var/www/pantaleon_dev/wp-content/plugins/sitepress-multilingual-cms/classes/container/class-config.php on line 63 and defined in /var/www/pantaleon_dev/wp-content/plugins/sitepress-multilingual-cms/classes/user/UsersByCapsRepository.php:18
Stack trace:
#0 /var/www/pantaleon_dev/wp-content/plugins/sitepress-multilingual-cms/classes/container/class-config.php(63): WPML\User\UsersByCapsRepository->__construct()
#1 [internal function]: WPML\Container\Config::WPML\Container\{closure}()
#2 /var/www/pantaleon_dev/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/auryn/lib/Executable.php(62): call_user_func_array()
#3 /var/www/pantaleon_dev/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/auryn/lib/Executable.php(46): WPML\Auryn\Executable->invokeClosureCompat()
#" while reading response header from upstream, client: 162.158.79.191, server: test.pantaleon.com, request: "GET /wp-json/wp-smush/v1/preset_configs HTTP/2.0", upstream: "hidden link:", host: "test.pantaleon.com", referrer: "hidden link"

September 2, 2023 at 9:06 am #14329839

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hello There,
Thanks for contacting WPML Support.

I checked the Error log and would like to inform you that our dev team has already been able to reproduce the same issue. You may encounter this unexpected fatal error on the server with the OpCache caching engine.

Our development team has identified a workaround for this issue. Could you please try the solution outlined in the Errata below and check if you're getting the expected result or not?

- https://wpml.org/errata/opcache-php-fatal-error-uncaught-typeerror-wpmluserusersbycapsrepository__construct-argument-2-languagepairs-must-be-of-type-wpmluserlanguagepairsilanguagepairs/

Let me know if that helps or if you need further assistance. I will be happy to help.

Best regards,
Prosenjit