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 Bigul 1 year, 10 months ago.

Assisted by: Bigul.

Author Posts
June 13, 2023 at 12:51 pm #13817249

vanjaB-2

I am trying to: Translate a page

When trying to translate one page we get this error:

Warning: Array to string conversion in /var/www/html/klevu_website/wp-content/plugins/acfml/classes/class-wpml-acf-blocks.php on line 164

Warning: Array to string conversion in /var/www/html/klevu_website/wp-content/plugins/acfml/classes/class-wpml-acf-blocks.php on line 164

Warning: Array to string conversion in /var/www/html/klevu_website/wp-content/plugins/acfml/classes/class-wpml-acf-blocks.php on line 164

Warning: Array to string conversion in /var/www/html/klevu_website/wp-content/plugins/acfml/classes/class-wpml-acf-blocks.php on line 164

Warning: Array to string conversion in /var/www/html/klevu_website/wp-content/plugins/acfml/classes/class-wpml-acf-blocks.php on line 164

Fatal error: Uncaught TypeError: mb_strpos(): Argument #1 ($haystack) must be of type string, array given in /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Strings.php:80 Stack trace: #0 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Strings.php(80): mb_strpos() #1 [internal function]: WPML\FP\Str::WPML\FP\{closure}() #2 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array() #3 [internal function]: WPML\FP\{closure}() #4 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(50): call_user_func_array() #5 [internal function]: WPML\FP\{closure}() #6 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array() #7 [internal function]: WPML\LIB\WP\Gutenberg::WPML\FP\{closure}() #8 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array() #9 [internal function]: WPML\FP\{closure}() #10 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(50): call_user_func_array() #11 [internal function]: WPML\LIB\WP\Gutenberg::WPML\FP\{closure}() #12 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array() #13 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Maybe.php(125): WPML\FP\{closure}() #14 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/strategy/shortcode/class-wpml-pb-shortcode-content-wrapper.php(271): WPML\FP\Just->filter() #15 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/strategy/shortcode/class-wpml-pb-register-shortcodes.php(60): WPML_PB_Shortcode_Content_Wrapper::maybeWrap() #16 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/strategy/shortcode/class-wpml-pb-shortcode-strategy.php(122): WPML_PB_Register_Shortcodes->register_shortcode_strings() #17 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/class-wpml-pb-integration.php(369): WPML_PB_Shortcode_Strategy->register_strings_in_content() #18 /var/www/html/klevu_website/wp-includes/class-wp-hook.php(308): WPML_PB_Integration->register_strings_in_content() #19 /var/www/html/klevu_website/wp-includes/plugin.php(205): WP_Hook->apply_filters() #20 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Gutenberg/class-wpml-gutenberg-strings-registration.php(107): apply_filters() #21 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Gutenberg/class-wpml-gutenberg-strings-registration.php(144): WPML_Gutenberg_Strings_Registration->register_blocks() #22 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Gutenberg/class-wpml-gutenberg-strings-registration.php(59): WPML_Gutenberg_Strings_Registration->register_blocks() #23 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Gutenberg/class-wpml-gutenberg-integration.php(68): WPML_Gutenberg_Strings_Registration->register_strings() #24 /var/www/html/klevu_website/wp-includes/class-wp-hook.php(308): WPML_Gutenberg_Integration->register_strings() #25 /var/www/html/klevu_website/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #26 /var/www/html/klevu_website/wp-includes/plugin.php(517): WP_Hook->do_action() #27 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/strategy/api-hooks/class-wpml-pb-api-hooks-strategy.php(17): do_action() #28 [internal function]: WPML_PB_API_Hooks_Strategy->register_strings() #29 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Invoker/Invoker.php(41): call_user_func_array() #30 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(175): WPML\FP\Invoker\_Invoker->__invoke() #31 [internal function]: WPML\FP\Fns::WPML\FP\{closure}() #32 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array() #33 [internal function]: WPML\FP\{closure}() #34 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(164): array_map() #35 [internal function]: WPML\FP\Fns::WPML\FP\{closure}() #36 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array() #37 [internal function]: WPML\FP\Fns::WPML\FP\{closure}() #38 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array() #39 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(169): WPML\FP\Fns::__callStatic() #40 [internal function]: WPML\FP\Fns::WPML\FP\{closure}() #41 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array() #42 [internal function]: WPML\FP\Fns::WPML\FP\{closure}() #43 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array() #44 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/class-wpml-pb-integration.php(275): WPML\FP\Fns::__callStatic() #45 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/class-wpml-pb-integration.php(205): WPML_PB_Integration->with_strategies() #46 /var/www/html/klevu_website/wp-includes/class-wp-hook.php(308): WPML_PB_Integration->register_all_strings_for_translation() #47 /var/www/html/klevu_website/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #48 /var/www/html/klevu_website/wp-includes/plugin.php(517): WP_Hook->do_action() #49 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php(1335): do_action() #50 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/classes/class-wpml-translation-job-factory.php(101): TranslationManagement->send_jobs() #51 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/classes/jobs/Manual.php(101): WPML_Translation_Job_Factory->create_local_job() #52 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/classes/jobs/Manual.php(33): WPML\TM\Jobs\Manual->createLocalJob() #53 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(207): WPML\TM\Jobs\Manual->createOrReuse() #54 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/classes/editor/Editor.php(85): WPML\FP\Right->map() #55 /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/classes/menu/translation-queue/class-wpml-translations-queue.php(52): WPML\TM\Editor\Editor->open() #56 /var/www/html/klevu_website/wp-includes/class-wp-hook.php(308): WPML_Translations_Queue->load() #57 /var/www/html/klevu_website/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #58 /var/www/html/klevu_website/wp-includes/plugin.php(517): WP_Hook->do_action() #59 /var/www/html/klevu_website/wp-admin/includes/class-wp-screen.php(424): do_action() #60 /var/www/html/klevu_website/wp-admin/includes/screen.php(243): WP_Screen->set_current_screen() #61 /var/www/html/klevu_website/wp-admin/admin.php(212): set_current_screen() #62 {main} thrown in /var/www/html/klevu_website/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Strings.php on line 80

The issue is caused by WPML -> ACF integration. For some reason is passing array data to their string functions.

June 13, 2023 at 3:08 pm #13818559

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

This may be related to the following known issue. Please try the workaround suggested in the errata after a full site backup{mandatory} and check whether the issue is existing or not.

https://wpml.org/errata/elementor-and-php8-when-saving-a-page-there-is-php-fatal-error-uncaught-valueerror-mb_strpos/

Also, please make sure you are using the latest version of the theme and plugins.

https://wpml.org/forums/topic/wordpress-errors/

--
Thanks!

Bigul