Waiting for author
Overview of the issue
When using ThemeREX Addons with WPML, you might experience a fatal PHP error on translated pages that include the Testimonials widget. The error message is:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in .../wp-content/plugins/trx_addons/cpt/testimonials/tpl.default-item.php:33
Workaround
To prevent this error, make the relevant custom fields and shortcode attributes translatable.
- Go to WPML > Settings > Custom XML Configuration in your WordPress dashboard.
- Add the following XML configuration and save:
<wpml-config> <custom-fields> <custom-field action="translate">trx_addons_options</custom-field> </custom-fields> <shortcodes> <shortcode> <tag>trx_sc_testimonials</tag> <attributes> <attribute type="taxonomy-ids" sub-type="cpt_testimonials_group">cat</attribute> <attribute type="post-ids" sub-type="cpt_testimonials">ids</attribute> <attribute>subtitle</attribute> </attributes> </shortcode> </shortcodes> </wpml-config>