Skip to content Skip to sidebar

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Argentina/Buenos_Aires (GMT-03:00)

This topic contains 6 replies, has 0 voices.

Last updated by Otto 4 days, 17 hours ago.

Assisted by: Otto.

Author Posts
January 5, 2026 at 6:12 pm #17705109

pedrov-19

When i enable the plugin string translation the REST API is not available anymore. This also creates error problems on various pages.
I use the following module versions:
WordPress versie 6.9
Actief thema: Oceanica (versie 2.4.0)
Huidige plugin: WPML String Translation (versie 3.4.1)
PHP versie 8.4.14
The error stack trace is:
Stack trace:
#0 /volume1/web/campo2/wp-content/plugins/wpml-string-translation/StringTranslation/Application/StringGettext/Service/GettextStringsService.php(96): WPML\StringTranslation\Infrastructure\StringGettext\Validator\IsExcludedDomainStringValidator->validate('Recent News', NULL)
#1 /volume1/web/campo2/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/WordPress/HookHandler/GetTextFilter.php(30): WPML\StringTranslation\Application\StringGettext\Service\GettextStringsService->queueStringAsPendingIfUntranslatedOrNotTracked('Recent News', NULL)
#2 /volume1/web/campo2/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/WordPress/HookHandler/AbstractFilterHookHandler.php(14): WPML\StringTranslation\Infrastructure\WordPress\HookHandler\GetTextFilter->onFilter('Recent News', 'Recent News', NULL)
#3 /volume1/web/campo2/wp-includes/class-wp-hook.php(341): WPML\StringTranslation\Infrastructure\WordPress\HookHandler\AbstractFilterHookHandler->{closure:WPML\StringTranslation\Infrastructure\WordPress\HookHandler\AbstractFilterHookHandler::load():13}('Recent News', 'Recent News', NULL)
#4 /volume1/web/campo2/wp-includes/plugin.php(205): WP_Hook->apply_filters('Recent News', Array)
#5 /volume1/web/campo2/wp-includes/l10n.php(207): apply_filters('gettext', 'Recent News', 'Recent News', NULL)
#6 /volume1/web/campo2/wp-includes/l10n.php(340): translate('Recent News', NULL)
#7 /volume1/web/campo2/wp-content/plugins/oceanica-engine/widgets/Items/Recent_News.php(11): esc_html__('Recent News', NULL)
#8 /volume1/web/campo2/wp-includes/class-wp-widget-factory.php(62): Oceanica_Plugin_Widget_Recent_News->__construct()
#9 /volume1/web/campo2/wp-includes/widgets.php(123): WP_Widget_Factory->register('Oceanica_Plugin...')
#10 /volume1/web/campo2/wp-content/plugins/oceanica-engine/widgets/Items/Recent_News.php(91): register_widget('Oceanica_Plugin...')
#11 /volume1/web/campo2/wp-includes/class-wp-hook.php(341): register_widget_recent_news('')
#12 /volume1/web/campo2/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
#13 /volume1/web/campo2/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
#14 /volume1/web/campo2/wp-includes/widgets.php(1884): do_action('widgets_init')
#15 /volume1/web/campo2/wp-includes/class-wp-hook.php(341): wp_widgets_init('')
#16 /volume1/web/campo2/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
#17 /volume1/web/campo2/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
#18 /volume1/web/campo2/wp-settings.php(742): do_action('init')
#19 /volume1/web/campo2/wp-config.php(87): require_once('/volume1/web/ca...')
#20 /volume1/web/campo2/wp-load.php(50): require_once('/volume1/web/ca...')
#21 /volume1/web/campo2/wp-admin/admin.php(35): require_once('/volume1/web/ca...')
#22 {main}
thrown

January 5, 2026 at 7:52 pm #17705298

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

In my opinion, the issue is coming from the theme.

esc_html__('Recent News', NULL)

Should not pass NULL, but a string with the text domain.

You can confirm this with the following test:
❌ Please make a full website backup before proceeding ❌
Temporarily switch to a default theme (e.g., Twenty Twenty-Four) and keep WPML String Translation enabled.
If the site + /wp-json/ works with the default theme, the issue is strongly tied to Oceanica / oceanica-engine.
Contact the theme/plugin author and report that the widget calls esc_html__( 'Recent News', NULL ) (invalid domain), which breaks when WPML hooks gettext.

You can also fix it yourself:
In wp-content/plugins/oceanica-engine/widgets/Items/Recent_News.php, locate the call esc_html__('Recent News', NULL).
Replace NULL with the correct text domain string used by Oceanica/oceanica-engine (for example, a domain like oceanica-engine if that’s what they load), or remove the domain argument, so WordPress falls back to 'default'.
Note: this may be overwritten by future updates; the “proper” fix is from the theme/plugin author.

The latest version of the theme is 2.5, and as far as I can see your site uses 2.4, so before anything, I suggest updating the theme. ❌ Please make a full website backup before proceeding ❌

Let me know how it goes, please.

Best Regards,
Otto

January 6, 2026 at 7:49 pm #17707815

pedrov-19

I have update the theme to the latest version. This did not solve the fatal error in string translations. I have not created a ticket with Motopress for this. Waiting now for a reply.

January 6, 2026 at 7:50 pm #17707816

pedrov-19

Typing mistake…
I have now created a ticket with Motopress for this

January 7, 2026 at 2:07 pm #17709674

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks. Let me know what they say, please.

Best Regards,
Otto

January 10, 2026 at 8:36 am #17717834

pedrov-19

Motopress is not able to solve the fatal error so far. All their suggestions do not work. I deleted the Recent_News translations and localilized again only the one with domain oceanica. Translated this one, but the issue is still there.
Waiting again for new guidance from them.

January 12, 2026 at 1:06 pm #17721548

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue.
It would be better to a testing site where the issue is replicated.

The information you will enter is private which means only you and I can see and have access to it.
Maybe I'll need to replicate your site locally. For this, I'll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site.
This will allow me to create a copy of your site and your content.
Once the problem is resolved I will delete the local site.

**IMPORTANT**
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields.

Best Regards,
Otto