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:
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
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
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
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