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
- 11:00 – 15:00 11:00 – 15:00 11:00 – 15:00 11:00 – 15:00 11:00 – 15:00 -
- 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 -

Supporter timezone: Europe/Rome (GMT+02:00)

This topic contains 1 reply, has 0 voices.

Last updated by Laura 9 months ago.

Assisted by: Laura.

Author Posts
July 19, 2025 at 4:42 pm #17252444

steveS-5

Background of the issue:
I am experiencing a fatal PHP error related to WPML’s class-wpml-element-translation.php when using it alongside the Inspect plugin. The error occurs when loading a page that triggers wpml_object_id_filter or the Inspect plugin’s assets registration. I have implemented a temporary fix by adding a type guard before line 282 in class-wpml-element-translation.php to ensure $element_id is scalar. I am using WordPress version 6.8.1, WPML version 4.7.6, Inspect plugin version 3.0.9, PHP version 8.1, and the Avada theme version 7.12.1. I request a permanent fix in a future WPML release to avoid compatibility issues with plugins like Inspect.

Symptoms:
Fatal error: Uncaught TypeError: Illegal offset type in isset or empty in .../sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 282. The error occurs consistently, breaking the site.

Questions:
Can you provide a permanent fix for the TypeError in WPML’s class-wpml-element-translation.php?
Is there a known compatibility issue between WPML and the Inspect plugin?

July 22, 2025 at 2:45 pm #17259895

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

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

Hi,

Thanks for contacting us.

Can you please provide us with the full error, including the stack trace?

The topic ‘[Closed] Fatal error due to “Illegal offset type in isset or empty” in WPML’s class-wpml-element-translat…’ is closed to new replies.