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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Raja Mohammed 2 months, 2 weeks ago.

Assigned support staff: Raja Mohammed.

Author Posts
July 30, 2019 at 11:35 am #4307213

kuttnerd

I am trying to:
Edit a post in block_editor. any language, post_type, post_status, new post, edit post. All.

Link to a page where the issue can be seen:
sorry, its local.

I expected to see:
The block_editor opens without errors and I can edit a post.

Instead, I got:
When the block_editor is loaded, a modal opens "You are about to change the language of... Do you want to continue". If click ok, the page reloads and same modal opens. Infinite.
See attached screenshot.

The modal is opened from `post-edit-terms.js`. I think the script is made for the old editor. It targets dom elements of the old editor and even tries to append an `input#icl_post_language` but that id is existing already.
I think this script should not be enqueued in the block_editor. It should be rewritten first.

I use this as a workaround, and just deregister the script for the block_editor:
```
**
* Deregister sitepress-post-edit-tags script on editor.
* To fix this issue hidden link
*/
function arepo_deregister_wpml_post_edit_script() {
$screen = get_current_screen();
if ( 'post' !== $screen->base || ! $screen->is_block_editor )
return;

wp_deregister_script( 'sitepress-post-edit-tags' );
}
add_action( 'admin_enqueue_scripts', 'arepo_deregister_wpml_post_edit_script', 3 ); // 2 === wpml priority
```

What are the disadvantages of deregistering the script?

July 31, 2019 at 4:07 am #4311401

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi there,

I will help you with your issue,

This seems more likely a plugin or theme conflict with WPML,
- Please try disabling all Non-WPML plugins check if the issue persists
- If the issue disappears try to activate the plugins one by one to identify the conflicting plugin
- If the Plugin deactivation didn't help change the theme to any of WordPress default theme check if that helps

This might be due to an incompatible plugin or any plugin that has not been supported for a while.

Please share the results.

Kind regards
Raja

The topic ‘[Closed] Whenever I want to open the editor, wpml prompts "You are about to change the la’ is closed to new replies.