Skip Navigation

Resolved

Reported for: WPML Multilingual CMS 4.5.14

Resolved in: WPML 4.7.2

Topic Tags: Bug

Overview of the issue

If you try to create a new template using the WordPress Site Editor (formerly known as Full Site Editing) from the editing page (by going to the right panel → TemplateAdd template), you will see a JavaScript error in the console:

POST https://www.domain.com/wp-json/wp/v2/templates?_locale=user 400 (Bad Request)

Workaround

After creating a new template with the Site Editor, set the language information as follows:

  1. Go to WPMLSupportTroubleshooting.
  2. Click on the Set language information button.

Now, you will be able to edit your templates from AppearanceEditorTemplates.

2 Responses to “Creating a new Site Editor template does not work when WPML is active”

  1. I found a similar problem when assigning a new blocks template (that I previously also translated) to a translated page, WordPress will not save the change. Or even for the original pages, the page field “template” will display the “default” one. The workaround is to deactivate WPML, then assign the template to the page, save, and reactivate WPML; then the change will stay.

    • Hello Miguel,
      We don’t have similar reports but we would like to investigate this situation deeper. Could you please start a chat in our assistance channel? In that way, one of our specialists will take a look of your case and try to provide you a more suitable workaround?
      Regards