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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

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

Tagged: 

This topic contains 3 replies, has 0 voices.

Last updated by Marcel 3 days, 8 hours ago.

Assisted by: Marcel.

Author Posts
November 20, 2025 at 1:34 pm #17595887

Pieter

Background of the issue:
I am trying to use Gutenberg with iframe (Blocks v3), but after enabling WPML, Gutenberg reverts to using Blocks v2, which does not support iframe. This affects my styles that are targeted for iframe.

Related resources:
https://developer.wordpress.org/block-editor/reference-guides/block-api/block-api-versions/
hidden link.

Symptoms:
Gutenberg does not use iframe anymore after enabling WPML, reverting to Blocks v2.

Questions:

November 21, 2025 at 6:59 am #17597447

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hi,

could you share a staging site or a Duplicator package so we can reproduce the problem and investigate further?

Best regards,
Marcel

November 21, 2025 at 6:29 pm #17600327

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Thanks, Pieter! I reproduced it on our own test environment and escalated it to our developers.

Best Regards,
Marcel

November 24, 2025 at 8:06 am #17603168

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hi,

here is a workaround for this case:

1) Open /wp-content/plugins/sitepress-multilingual-cms/classes/block-editor/Blocks/LanguageSwitcher.php

2) Put

'api_version'     => '3',

on two places so that it becomes:

	private function registerLanguageSwitcherBlock() {
		$blockSettings = [
			'render_callback' => [ $this->render, 'render_block' ],
			'api_version'     => '3',
		];

		register_block_type( self::BLOCK_LANGUAGE_SWITCHER, $blockSettings );

	}
	private function registerNavigationLanguageSwitcherBlock() {
		$blockSettings = [
			'render_callback' => [ $this->render, 'render_block' ],
			'attributes'      => [
				'navigationLsHasSubMenuInSameBlock' => [
					'type'    => 'boolean',
					'default' => false,
				],
				'layoutOpenOnClick' => [
					'type'    => 'boolean',
					'default' => false,
				],
				'layoutShowArrow' => [
					'type'    => 'boolean',
					'default' => true,
				],
			],
			'uses_context'    => [
				'layout',
				'showSubmenuIcon',
				'openSubmenusOnClick',
				'style',
				'textColor',
				'customTextColor',
				'backgroundColor',
				'customBackgroundColor',
				'overlayTextColor',
				'customOverlayTextColor',
				'overlayBackgroundColor',
				'customOverlayBackgroundColor',
				'fontSize',
				'customFontSize'
			],
			'api_version'     => '3',
		];

		register_block_type( self::BLOCK_NAVIGATION_LANGUAGE_SWITCHER, $blockSettings );
	}

Our devs will change this in one of the next releases.

Best Regards,
Marcel