SOLVED: Critical error when trying to translate template with WPML

Browser: Chrome 110
OS: Windows

Trying to translate most templates results in this error:

[Mon Sep 25 17:41:31 2023] [error] [client 95.25.120.239:0] PHP Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /home/k/karatec1/666.zzzx.ru/public_html/wp-content/plugins/wpml-string-translation/classes/filters/strings-filter/class-wpml-register-string-filter.php:205\nStack trace:\n#0 /home/k/karatec1/666.zzzx.ru/public_html/wp-content/plugins/wpml-string-translation/classes/filters/strings-filter/class-wpml-register-string-filter.php(205): strlen(Array)\n#1 /home/k/karatec1/666.zzzx.ru/public_html/wp-content/plugins/wpml-string-translation/classes/filters/strings-filter/class-wpml-register-string-filter.php(184): WPML_Register_String_Filter->save_string(Array, false, ‘ru’, ‘bricks-1695’, ‘’, ‘eanncl_link’)\n#2 /home/k/karatec1/666.zzzx.ru/public_html/wp-content/plugins/wpml-string-translation/inc/functions.php(214): WPML_Register_String_Filter->register_string(‘’, ‘eanncl_link’, Array, false, ‘ru’)\n#3 /home/k/karatec1/666.zzzx.ru/public_html/wp-content/plugins/wpml-string-translation/inc/package-translation/inc/wpml-package.class.php(313): icl_register_string(‘bricks-1695’, ‘eanncl_link’, Array, false, ‘ru’)\n#4 /home/k/karatec1/666.zzzx.ru/public_html/wp-content/plugins/wpml-string-translation/inc/package-translation/inc/wpml-package-translation-helper.class.php(532): WPML_Package->get_string_id_from_package(‘eanncl_link’, Array)\n#5 /home/k/karatec1/666.zzzx.ru/public_html/wp-content/plugins/wpml-string-translation/inc/package-translation/inc/wpml-package-translation-helper.class.php(176): WPML_Package_Helper->get_string_id_from_package(Object(WPML_Package), ‘eanncl_link’, Array)\n#6 /home/k/karatec1/666.zzzx.ru/public_html/wp-content/plugins/wpml-string-translation/inc/package-translation/inc/wpml-package-translation-helper.class.php(148): WPML_Package_Helper->register_string_with_wpml(Object(WPML_Package), ‘eanncl_link’, ‘Bricks (\xD0\x97\xD0\xB0\xD0\xB3\xD0…’, ‘LINE’, Array)\n#7 /home/k/karatec1/666.zzzx.ru/public_html/wp-content/plugins/wpml-string-translation/inc/package-translation/inc/wpml-package-translation-helper.class.php(82): WPML_Package_Helper->register_string_for_translation(Array, ‘eanncl_link’, Object(WPML_Package), ‘Bricks (\xD0\x97\xD0\xB0\xD0\xB3\xD0…’, ‘LINE’)\n#8 [internal function]: WPML_Package_Helper->register_string_action(Array, ‘eanncl_link’, Array, ‘Bricks (\xD0\x97\xD0\xB0\xD0\xB3\xD0…’, ‘LINE’)\n#9 /home/k/karatec1/666.zzzx.ru/public_html/wp-includes/class-wp-hook.php(310): call_user_func_array(Array, Array)\n#10 /home/k/karatec1/666.zzzx.ru/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array)\n#11 /home/k/karatec1/666.zzzx.ru/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)\n#12 /home/k/karatec1/666.zzzx.ru/public_html/wp-content/themes/bricks/includes/integrations/wpml/wpml.php(257): do_action(‘wpml_register_s…’, Array, ‘eanncl_link’, Array, ‘Bricks (\xD0\x97\xD0\xB0\xD0\xB3\xD0…’, ‘LINE’)\n#13 /home/k/karatec1/666.zzzx.ru/public_html/wp-content/themes/bricks/includes/integrations/wpml/wpml.php(198): Bricks\Integrations\Wpml\Wpml->register_wpml_string(Array, ‘eanncl_link’, ‘\xD0\x97\xD0\xB0\xD0\xB3\xD0\xBE\xD0\xBB\xD0\xBE\xD0\xB2\xD0…’, Object(WP_Post), ‘link’)\n#14 /home/k/karatec1/666.zzzx.ru/public_html/wp-content/themes/bricks/includes/integrations/wpml/wpml.php(173): Bricks\Integrations\Wpml\Wpml->process_control(‘link’, Array, Array, Array, ‘\xD0\x97\xD0\xB0\xD0\xB3\xD0\xBE\xD0\xBB\xD0\xBE\xD0\xB2\xD0…’, Array, Object(WP_Post))\n#15 /home/k/karatec1/666.zzzx.ru/public_html/wp-content/themes/bricks/includes/integrations/wpml/wpml.php(154): Bricks\Integrations\Wpml\Wpml->process_element(Array, Object(WP_Post))\n#16 [internal function]: Bricks\Integrations\Wpml\Wpml->wpml_page_builder_register_strings(Object(WP_Post), Array)\n#17 /home/k/karatec1/666.zzzx.ru/public_html/wp-includes/class-wp-hook.php(310): call_user_func_array(Array,sh: 1: host: not found

Hi @Illarion,

Could you please share temporary admin access to help@bricksbuilder.io with a link to this thread and a link to a template where this is happening?

Thank you.

I do have the same issue. Did you find a general problem and a workaround we can implement as well?

Hi @JUVO_Justin,

Yup we did find a problem with external links within repeaters and the fix is included in the 1.9.2-beta release :slight_smile:

1 Like