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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 12:00 7:00 – 12:00 7:00 – 12:00 7:00 – 12:00 7:00 – 12:00 -
- 13:00 – 16:00 13:00 – 16:00 13:00 – 16:00 13:00 – 16:00 13:00 – 16:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

Tagged: 

This topic contains 1 replies, has 0 voices.

Last updated by Lucas Vidal de Andrade 1 month ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
May 7, 2025 at 7:26 pm #17008721

tarantula

Background of the issue:
I was trying to use the WPML Multilingual CMS plugin on my WordPress site. The error is related to the ItemWordCountService.php file.

Symptoms:
I encountered a sporadic error with the WPML Multilingual CMS plugin. The error message is: 'Uncaught TypeError: WPMLCoreComponentPostApplicationWordCountItemWordCountService::__construct(): Argument #3 ($stringCalculator) must be of type WPMLCoreComponentPostDomainWordCountItemContentCalculatorStringCalculator, WPMLCoreComponentPostDomainWordCountItemContentCalculatorStringCalculator given in D:Domainsmalomore.comwwwrootwp-contentpluginssitepress-multilingual-cmsvendorwpmlwpmlsrcCoreComponentPostApplicationWordCountItemWordCountService.php:22'.

Questions:
Can you check WPML Multilingual CMS error below?!

Now after change PHP version in hosting control panel the error has disappeared, but error occurs sporadically.

-----Izvorna poruka-----
Pošiljatelj: kontakt@malomore.com [mailto:kontakt@malomore.com]
Poslano: srijeda, 7. svibnja 2025. 20:57
Primatelj: info@mariva.net
Predmet: [Malo More - Resort] Your Site is Experiencing a Technical Issue

Howdy!

WordPress has a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

In this case, WordPress caught an error with one of your plugins, WPML Multilingual CMS.

First, visit your website (hidden link) and check for any visible issues. Next, visit the page where the error was caught (hidden link) and check for any visible issues.

Please contact your host for assistance with investigating this issue further.

To keep your site safe, this link will expire in 1 day. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.

When seeking help with this issue, you may be asked for some of the following information:
WordPress version 6.8.1
Active theme: w4w (version 1.0.0)
Current plugin: WPML Multilingual CMS (version 4.7.4)
PHP version 8.3.15

Error Details
=============
An error of type E_ERROR was caused in line 22 of the file D:Domainsmalomore.comwwwrootwp-contentpluginssitepress-multilingual-cmsvendorwpmlwpmlsrcCoreComponentPostApplicationWordCountItemWordCountService.php. Error message: Uncaught TypeError: WPMLCoreComponentPostApplicationWordCountItemWordCountService::__construct(): Argument #3 ($stringCalculator) must be of type WPMLCoreComponentPostDomainWordCountItemContentCalculatorStringCalculator, WPMLCoreComponentPostDomainWordCountItemContentCalculatorStringCalculator given in D:Domainsmalomore.comwwwrootwp-contentpluginssitepress-multilingual-cmsvendorwpmlwpmlsrcCoreComponentPostApplicationWordCountItemWordCountService.php:22
Stack trace:
#0 [internal function]: WPMLCoreComponentPostApplicationWordCountItemWordCountService->__construct()
#1 D:Domainsmalomore.comwwwrootwp-contentpluginssitepress-multilingual-cmsvendorrdlowreyaurynlibInjector.php(415): ReflectionClass->newInstanceArgs()
#2 D:Domainsmalomore.comwwwrootwp-contentpluginssitepress-multilingual-cmsvendorrdlowreyaurynlibInjector.php(373): AurynInjector->provisionInstance()
#3 D:Domainsmalomore.comwwwrootwp-contentpluginssitepress-multilingual-cmsvendorrdlowreyaurynlibInjector.php(542): AurynInjector->make()
#4 D:Domainsmalomore.comwwwrootwp-contentpluginssitepress-multilingual-cmsvendorrdlowreyaurynlibInjector.php(474): AurynInjector->buildArgFromTypeHint()
#5 D:Domainsmalomore.comwwwrootwp-contentpluginssitepress-multilingual-cmsvendorrdlowreyaurynlibInjector.php(414): AurynInjector->provisionFuncArgs()
#6 D:Domainsmalomore.comwwwrootwp-contentpluginssitepress-multilingual-cmsvendorrdlowreyaurynlibInjector.php(373): AurynInjector->provisionInstance()
#7 D:Domainsmalomore.comwwwrootwp-contentpluginssitepress-multilingual-cmsvendorwpmlwpmlsrcInfrastructureDic.php(41): AurynInjector->make()
#8 D:Domainsmalomore.comwwwrootwp-contentpluginssitepress-multilingual-cmsvendorwpmlwpmlsrcUserInterfaceWebInfrastructureWordPressCompositionRootConfigEventItemWordCountEvents.php(126): WPMLInfrastructureDic->make()
#9 D:Domainsmalomore.comwwwrootwp-contentpluginssitepress-multilingual-cmsvendorwpmlwpmlsrcUserInterfaceWebInfrastructureWordPressCompositionRootConfigEventItemWordCountEvents.php(88): WPMLUserInterfaceWebInfrastructureWordPressCompositionRootConfigEventItemWordCountEvents->getOnPostSavedListener()
#10 D:Domainsmalomore.comwwwrootwp-includesclass-wp-hook.php(326): WPMLUserInterfaceWebInfrastructureWordPressCompositionRootConfigEventItemWordCountEvents->WPMLUserInterfaceWebInfrastructureWordPressCompositionRootConfigEventItemWordCount{closure}()
#11 D:Domainsmalomore.comwwwrootwp-includesclass-wp-hook.php(348): WP_Hook->apply_filters()
#12 D:Domainsmalomore.comwwwrootwp-includesplugin.php(517): WP_Hook->do_action()
#13 D:Domainsmalomore.comwwwrootwp-includespost.php(5110): do_action()
#14 D:Domainsmalomore.comwwwrootwp-adminincludespost.php(765): wp_insert_post()
#15 D:Domainsmalomore.comwwwrootwp-adminincludesdashboard.php(556): get_default_post_to_edit()
#16 D:Domainsmalomore.comwwwrootwp-adminincludestemplate.php(1456): wp_dashboard_quick_press()
#17 D:Domainsmalomore.comwwwrootwp-adminincludesdashboard.php(274): do_meta_boxes()
#18 D:Domainsmalomore.comwwwrootwp-adminindex.php(204): wp_dashboard()
#19 {main}
thrown

May 8, 2025 at 1:47 pm #17012321

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

I would like to look at this directly on your site. For this I would need temporary access (WP-Admin and FTP) to your site, preferably to a test/staging site where the problem has been replicated if possible.

The required fields can be found below the comments section. The information you enter is private, i.e. only you and I can see it and have access to it.

I may need to replicate your website locally. To do this, I need to temporarily install a plugin called "Duplicator" or "All in One WP Migration" on your website. This will allow me to create a copy of your website and content. Once the issue is resolved, I will delete the local website. Let me know if this works for you.

IMPORTANT

Please make a backup copy of the site files and database before giving us access.

- If you do not see the wp-admin/FTP fields, this means your post and site login details are being made PUBLIC. DO NOT post your website details if you do not see the required wp-admin/FTP fields. If you do not, ask me to enable the private box. The private box looks like this:

hidden link

The topic ‘[Closed] WPML Multilingual CMS error in ItemWordCountService.php’ is closed to new replies.