wp-calypso
wp-calypso copied to clipboard
FSE: Switching template on post/page to default template/template generated by the theme failed with error "Updating failed. Invalid parameter(s): template"
Quick summary
Cc. @vinnykaur as the first responder
Switching post/page template from "Default theme" to any template created by the theme will render the error Updating failed. Invalid parameter(s): template and the post/page can't be updated.
Steps to reproduce
-
Create a page or post.
-
Click the dropdown block on "Template" section. Choose the one that was created by default. In this example, I'm using "Page without title" template.

-
... And I can confirm the template "Page without title" is a template created by the theme (Quadrat/Quadrat Black)

-
See error and failed update attempt

What you expected to happen
For the post/page to be able to switch templates properly
What actually happened
Error Updating failed. Invalid parameter(s): template
Context
Customer report and both Vinny and I are able to replicate it
Simple, Atomic or both?
Simple
Theme-specific issue?
Blockbase-themes: (I'm testing it using Quadrat theme (Quadrat Black), and Vinny tested it using theme Russell)
Also reported: Zoologist
Browser, operating system and other notes
No response
Reproducibility
Consistent
Severity
No response
Available workarounds?
Yes, difficult to implement
Workaround details
The template switcheroo will work only with customized template (templates that we create from scratch)
When I tried with the Russell theme, creating a custom template worked from the path:
... /wp-admin/edit.php?post_type=wp_template
But not from within the post.
Also, when I assign a custom template to a post, it shows the same error.
https://user-images.githubusercontent.com/49183855/147487930-d243ef2a-9a95-452a-96bc-033019735a16.mp4
I got this error today when I was trying out FSE (as a part of my training) on Blockbase theme
- Create a page with default theme and publish it
- Change the template to any others - I chose
Header and Footer onlyfrom the option on the right-side toolbar in editor of the page. - I see this error

This is affecting a Simple Site (Premium) user with the Zoologist theme (FSE is not enabled) :
4640480-zd
- Created a new blank page
- Changed template to 'Blank'
- Getting error
Updating failed. Invalid parameter(s): template
I was able to replicate this on my test site (Zoologist, Premium plan)

I'm seeing this on two simple sites, the one mentioned here: https://wordpress.com/forums/topic/publishing-failed-invalid-parameters-template/
and on my test site. I tried enabling FSE on a test site to see if that would fix it. It didn't make a difference.
Another case in https://wordpress.com/forums/topic/how-to-hide-blog-page-titles-and-featured-images/?view=all, simple site using Russell theme
https://wordpress.com/forums/topic/template-3/?view=all, simple site on Zoologist
There's another report of this here: https://wordpress.com/forums/topic/new-post-updating-failed-invalid-parameters-template/?view=all > with the Russell theme.
+1 for Russel. 4649640-zd-woothemes
I was able to replicate as well. Set to High priority.
Tagging @Automattic/cylon and @Automattic/theam here
In the case of 4667283-zen, the user commented with the following:
The problem is not related to the theme since I tried to change the theme, it didn't change anything. I even tried changing the page template from another account.
4673315 - zd
+1 4673459-zd-woothemes
I think this is resolved by D72778-code.
I've followed up with the forum threads to ask them to try again.
I created a new simple site on a free plan for Quadrat Black today. When I make edits to a template, I'm still getting the Updating failed. Invalid parameter(s): template.
I was doing some dogfooding and found the same on the Zoologist theme:
- Open any published page and set the "Page without Title" template
- Click on Update
- Notice the error

Came here to say I've seen this as well in a few themes.
Ok I think we got to the bottom of this. Should be fixed, please reopen if it persists!
I have a new report of this issue in 34962329-hc
They were able to switch to the built-in "Headers and Footers Only" template, and then to one of their custom ones after that, so the user is good to go.
During some team testing, I found this error when trying to switch to a new page template on a simple site, and using the Blank Canvas theme.
I am unable to replicate the issue, so it seems intermittent. @jartes are you able to replicate it consistently? If so, can you provide steps to do so?
Closing this again for now, as no more reports and unable to replicate.
Reopening issue. Reported in 30878508-hc
Another report here: 4850193-zd-woothemes
I can reproduce the issue when creating a custom template and then trying to switch the template on the page to it.
https://user-images.githubusercontent.com/21261509/166203257-dc9ca99b-4fe1-475b-a468-de06a3f8ae57.mov
https://user-images.githubusercontent.com/21261509/166205010-8740b849-dc7f-45fd-8cf3-cedccbe6c525.mov
Another instance of this in 5182756-zen - I checked and was able to replicate.
Theme: Blank Canvas
It looks like I was able to apply the user's Homepage template to a test page, after creating my own test template? Now what I see on the user's site is: My test-template shows the invalid paramteter(s) error when I try to select it. I am able to select the user's template. It's as if my test template being at the top of the list now lets the user's template work.
📌 HOUSEKEEPING
- Labels ✅
- Priority ✅
- Updated main description of report - No
📌 SCRUBBING
- Tested on Simple ✅
- Themes Tested: Farrow, Quadrat White, Blank Canvas
📌 FINDINGS/SCREENSHOTS/VIDEO
- On a Personal Plan site, I tested the following themes and scenarios:
Farrow, Quadrat White, Blank Canvas with default settings - ❌ Not replicated
- could switch a new page to any default template without error
Further Testing: Blank Canvas - ✅ Replicated
-
Sticking with Blank Canvas, I created a "new custom template" via Page Editor > New template, saved, and then returned to my page and continued to switch templates successfully - both to default and my new custom template.
-
Next, I went to the Site Editor and edited the default Home template. This moved it to the top of the Template list, and denoted I'd edited it. Then I returned to the page, and began switching templates again. Here, the issue recurred only when I selected my custom template:

- I returned once more to the page, and once again the error returned when I tried selecting the custom template for the page to use.
https://user-images.githubusercontent.com/27249804/166803680-b67e4139-8617-4f00-bf6e-fe5e05ae1eb6.mov
Further Testing: Quadrat White - ❌ Not Replicated
Last, I switched to Quadrat White once more:
- With all default templates and no customizations made on templates, I can switch templates without issue.
- With edits made to one of my default templates, I can still switch templates without issue.
- Cleared customizations, then created a new custom template for the page. Can still switch templates (to new and default) without issue.
- Edited the "Page without Title" template, then returned to page - can still switch templates without issue.
- Edited the default "Page" template, then returned to page - still can't get the error to occur.
📌 ACTIONS
- Marked as Triaged for Quality Squad review
This is tough to replicate - for any future HE reports, please note the theme used, and provide as many steps you can share that would help us consistently replicate the error on a test site.
I encountered this issue while using Twenty Twenty-Two
I also saw this "failed to save" message, but I am not sure if it is related:

+1 with theme Dorna, 5286915-zd-woothemes
Also seeing this issue now on a site with the Quadrat theme.
- Created a new custom template in the Site Editor
- Tried switching a page (homepage) to the new template
- Observed error shown
