• While working on custom FSE theme, on Front page template in block editor, I used “Save Changes” option in sidebar. This completely cleared my template instead of saving into it, leaving only block reference to header template part. The template is complex, having many blocks and one video block. I hope you can reproduce the bug.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Moderator jordesign

    (@jordesign)

    Hey @lovor – that sounds terrible – I’m sorry to hear that happened, it definitely sounds odd. Have you had it happen multiple times? Or just the once?

    I’ve been unable to recreate it at this stage. So if it has happened multiple times – that’s definitely something worth digging into further.

    Thread Starter Lovro Hrust

    (@lovor)

    Yes, it happens every time. I switched to manually copying blocks from content and pasting into templates.

    Moderator jordesign

    (@jordesign)

    Thanks for confirming @lovor – can I also ask, does this behaviour only happen when the Create Block Theme plugin is active?

    Are you able to try it with all other plugins except the Create Block Theme plugin deactivated as well – to see if that makes a difference?

    Thread Starter Lovro Hrust

    (@lovor)

    This can’t happen when create block theme is not active, since this happens upon pushing “save changes” button

    I do not have much plugins activated, reBusted! and safeSVG. Yet, I tried deactivated all except create block theme and it happens nevertheless.

    If you provide some kind of contact, I can share template with you.

    Thread Starter Lovro Hrust

    (@lovor)

    Also, I am using WordPress version 6.3.1. Did you test with this version?

    Thread Starter Lovro Hrust

    (@lovor)

    What I noticed is, that after attempting saving changes in my front-page.html template this is written:
    <!– wp:pattern {“slug”:”themename/front-page”} /–>
    Should it not save content to template? It looks it attempts to create pattern and then refer in template to it, but result is that page is broken.

    Thread Starter Lovro Hrust

    (@lovor)

    Perhaps I misunderstood what plugin does, I expected it to save block contents from database to template and reset template in database. Instead, it creates pattern in patterns directory and sets template to point to it. Odd.

    Thread Starter Lovro Hrust

    (@lovor)

    One idea occured to me – I am using WP 6.3.1. Could this be related to change that occured in admin, where template parts are moved in patterns section? I am still not sure if this is a feature or a bug (for me it is a bug, did you intend to create a pattern?). I also found why it breaks images. I uploaded media files from certain folder in theme directory into media library. Somehow, that original location is still remembered and when plugin creates pattern, it refers to original location, instead of media library location, but media files are not there anymore, i.e., this is produced code:

    <video loop muted poster=”<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/hero-video-thumbnail.jpg” src=”<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/videos/Above-The-Fold-draft.webm” playsinline></video>

    Moderator jordesign

    (@jordesign)

    Hey @lovor – The purpose of the Create Block Theme plugin is predominantly to create a standalone theme (which can be shared and distributed) that is exported – rather than specifically a part of the ongoing editing of the theme (which is what Gutenberg/Site Editor is handling generally).

    It sounds like the error you’re getting is when you’re saving templates in the Site Editor itself – which would be related to Gutenberg, rather than the Create Block Theme plugin.

    Would it be possible to please take a screencast/video of the steps you follow and the result – to help narrow down where/why that is happening?

    Thread Starter Lovro Hrust

    (@lovor)

    Yes, I am aware that the primary purpose is to create block theme, I even started the current theme I am developing with this plugin. I wrote for brevity that “purpose is” instead of “one of the purposes” 🙂 Though, create block theme also registers a plugin in site editor, adding small wrench icon in the top bar, and clicking that fills a sidebar with several actions, one of which is “Save changes”, which I am referring to. I could take a video, but due to NDA, I will not expose publicly video of this theme, perhaps in a PM, or I will try to replicate the bug in new theme. I think this could easily be replicated, it seems that in WP 6.3.1 this functions in this way, instead saving changes to template creates new pattern putting all content in it and changing template just to reference to pattern. Further, in template paths are changed to original inserting location instead of location in media library.

    • This reply was modified 10 months ago by Lovro Hrust.
    Tony G

    (@starbuck)

    @lovor concisely described what I verbosely (and unsuccessfully?) tried to detail in this other thread.

    amyg1224

    (@amyg1224)

    What you experienced is exactly the same thing that occured for me.

    Moderator jordesign

    (@jordesign)

    @starbuck @amyg1224 ordinarily we discourage ‘me too’ comments – but as this is yet to be resolved – any additional information you can provide may help with tracking down the bug.

    Are either of you able to share a screenshot of this happening?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Destructive bug’ is closed to new replies.