Skip Navigation

Resolved

Topic Tags: Compatibility

Overview of the issue

If your website is running on PHP 8 and you attempt to translate a page using Houzez Elementor widget, Houzez Icon Box, you will find the following error:

PHP Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in ,,,/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/class-wpml-pb-string-registration.php:95

Workaround

  • Go to WPML > Configuration > Custom XML Configuration.
  • Add the following code:
    XML file for Houzez Icon Box widget
    <wpml-config>
      <elementor-widgets>
        <widget name="houzez_elementor_icon_box">
          <conditions>
            <condition key="widgetType">houzez_elementor_icon_box</condition>
          </conditions>
          <fields-in-item items_of="icon_boxes">
            <field type="Icon Box: Title" editor_type="LINE">title</field>
            <field type="Icon Box: Text" editor_type="LINE">text</field>
            <field type="Icon Box: Read More Text" editor_type="AREA">read_more_text</field>
            <field type="Icon Box: Read More Link" editor_type="LINK">read_more_link>link</field>
          </fields-in-item>
        </widget>
      </elementor-widgets>
    </wpml-config>
  • Try to translate your page again.