• Resolved Palijn

    (@palijn)


    Hello,
    When I create a new post, the template used is 404 ?!

    The only other choices in the dropdown are :

    • default template
    • Single Post (no separators)
    • Page (no separators)
    • Blank

    I would have thought the template to be “Single post” ?
    If yes, how do I change the template to “Single post” ?

    What am I risking if I publish with the 404 template anyway ?

    Wordpress 6.0, Twenty-twenty-two theme 1.2 .
    This happens both on my live mildly complex site, which I just migrated to Twenty-Twenty-Two, and on a vanilla demo site which has only existed with this theme.

    Thanks a lot for your assistance,
    Thierry

Viewing 12 replies - 1 through 12 (of 12 total)
  • Roxy

    (@roxannestoltz)

    Hi @palijn ,

    Thanks for reaching out!

    When I create a new post, the template used is 404 ?!

    This is the expected behavior of the builder as the 404 template is the default page template when creating a post. It’s a pretty simple template, including only a heading, a paragraph, and a search box, providing a good understanding of how the UI works and making edits to the page simplified.

    What am I risking if I publish with the 404 template anyway ?

    Nothing at all. This is simply a default template that can be used to create your post as needed, and published as per normal, without causing any complications as the page address will still lead to the post you have created, and not a 404 error page.

    If yes, how do I change the template to “Single post” ?

    You can create a new template that you can use as your own default template, and name it “Single post”, by selecting “New” below “Templates” in the template block, as seen in the screenshot below:

    https://snipboard.io/U6NIBK.jpg

    Hope this helps!

    Thread Starter Palijn

    (@palijn)

    Thanks @roxannestoltz for the detailed answer !

    As a side note, I noticed that when I create a new post, while in the creation stage, the template is 404.
    Then I publish the post, and when I re-open it, the template “magically” went to “Single post” ?! I guess this is expected ?

    I supposed I should not be interested in creating a Single Post template myself, since it already comes with the 2022 theme ?

    Thanks again
    Thierry

    Roxy

    (@roxannestoltz)

    Hi @palijn ,

    Thanks for providing an update.

    Then I publish the post, and when I re-open it, the template “magically” went to “Single post” ?! I guess this is expected ?

    Correct, this is the expected behavior. If you “switch back to draft”, you will notice the template change back to a 404 until published again.

    I supposed I should not be interested in creating a Single Post template myself, since it already comes with the 2022 theme ?

    Yes, this is part of the theme and as you have mentioned, it automatically changes when published, as the 404 template is a default template to work on and will cause no risks in publishing the post using this template.

    You are very welcome!

    Best,

    I noticed this as well when first starting to use the theme. I think this was a bad design/UX decision – to show a user that their new creation is somehow associated with an error. Yes, after some research we learn this is not the case. But a new pattern is being established that doesn’t exist anywhere else – intentionally anyway.

    Supposedly the templating system still follows the classic template hierarchy. If that’s the case then the 404 template should not be displayed as the default – the default should be the first template that is found in the hierarchy that matches the data available in a new post or page. That means, single.html or page.html, which are both available for this theme.

    If this isn’t already a ticket, I’ll create one – if some folks here agree that it’s worthy … I could be missing some Very good reasons for this 404 default thing. Frankly, I’m guessing the 404 template shows up because the code is lazy and it’s the first name selected from an alpha-sorted list. We can do better…

    Thread Starter Palijn

    (@palijn)

    @starbuck I wholly agree with the way you put it ! Yes, it might be worth a ticket.I have no clue where to open it, though. Please do as you wish !

    This confused me too, and given other glitches (some of which turned out to be my fault) caused me to lose some confidence in the new system. At the very least, it could show ‘default’ rather than ‘404’ in the draft state??

    Moderator Kathryn Presner

    (@zoonini)

    I completely agree that it’s not at all logical for the default new-post template to be 404 instead of Single, and in fact with the Gutenberg plugin active, the default becomes Single, as expected.

    I logged a bug report here:

    https://core.trac.wordpress.org/ticket/56163

    Moderator Kathryn Presner

    (@zoonini)

    Looks like this is not theme-specific; you can check out the related tickets that Sergey linked to in the Trac ticket. Good news is that looks like a fix is on the way!

    Moderator Kathryn Presner

    (@zoonini)

    And in the meantime, you can always activate the Gutenberg plugin to get the Single template as the default post template. 🙂

    THIS is the way WordPress works. Love it. Thanks.

    Moderator Kathryn Presner

    (@zoonini)

    @starbuck My pleasure. 🙂 It’s always nice when a fix is already in the works.

    For those who haven’t looked at the Trac ticket, the fix for this issue should be included in WP 6.0.1, which is scheduled to be released on July 12.

    Moderator Kathryn Presner

    (@zoonini)

    @palijn @starbuck @wharfpuppy @roxannestoltz This issue looks to be fixed in WP 6.0.1, which was just released. With the Gutenberg plugin inactive, adding a new post now correctly uses the Single Post template as the default.

    Add New Post Self hosted Test WordPress

    If anyone still has an issue after updating to WP 6.0.1, let me know and we can try troubleshooting further, but hopefully everything works as expected now.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘New post template is 404 !’ is closed to new replies.