Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing a critical error on your translated site pages, it might be due to a PHP Fatal error indicating a type mismatch. Specifically, the error occurs because the code expects an array but receives a string instead. This issue often arises with ACF custom fields that are not correctly handled in translations.
Solution:
We recommend checking the ACF custom fields used in your template. Ensure that fields such as 'section_details', 'section_info', and 'section_map' are properly registered for translation with WPML and are returning arrays as expected. Here's what you might see in your code:

$salon_details = get_field('section_details');

$salon_info = get_field('section_info');

$salon_map = get_field('section_map');

$map_link = $salon_details['map_link'];

$address = $salon_info['address'];

$coords = $salon_map['lat_lang'];

Please confirm where these fields are defined: Are they attached to a specific page, a custom post type, or an ACF Options Page? If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket.

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.

This topic contains 18 replies, has 0 voices.

Last updated by rafalK-25 4 days, 5 hours ago.

Assisted by: Bruno Kos.

Author Posts
January 8, 2026 at 6:43 am #17711688

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

Where are these buttons, on hidden link or elsewhere?

January 12, 2026 at 2:04 pm #17721802

rafalK-25

eg at hidden link -> Odkryj vouchery

at 3rd slide main page also -> Zamów voucher

hidden link -> odbierz ofertę specjalną

banner at the top of the page ->

Noworoczny voucher🥰

i think thats all

January 13, 2026 at 7:56 am #17723750

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

I see that these are of the type ACF Link.

section_voucher_link
Nazwa pola ACF: Link Typ pola ACF: link

I also see that its translation preference is locked and set to copy. Are you able to change this to "translate" and try then? Make sure to resave the original hidden link after this and then check the translation editor if these titles appear.

voucher link.jpg
voucher2.jpg
January 15, 2026 at 4:10 pm #17734816

rafalK-25

With your hints and help i've managed to deal with it 🙂 thank you!

January 15, 2026 at 4:10 pm #17734817

rafalK-25

With your hints and help i've managed to deal with it 🙂 thank you!