-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template Part Not Found for badly formed wp:template-part HTML comment #16
Comments
Another form that doesn't work, and doesn't even produce a message, is when there's no space between the block name ( template-part ) and the left curly brace, or when the wrong character has been used. eg
|
There are many more ways to write an invalid block tag inside an HTML comment. Too many closing curly braces.
I had this problem with a template-part. The extra curly brace prevented any of the attributes being set. Warning: Undefined array key "slug" in C:\apache\htdocs\wordpress\wp-content\themes\sb\includes\template-part.php on line 78 An end block slash where it shouldn't be
This one took me longer to find. See bobbingwide/sb#13 |
I'm closing this as |
While developing the
archive.html
template file I encountered a problem where the Template Part Not Found message was displayed but there was no template name. The only attribute value passed togutenberg_render_block_core_template_part()
wastagName
, with a value ofdiv
.Analysis of the HTML comment that formed the wp:template-part block indicated that I was missing a comma between attributes.
It would be helpful if the error could be detected and a message produced.
The text was updated successfully, but these errors were encountered: