-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
WP 6.3-beta3 front-page template shows static page on initial loading #52388
Comments
@ramonjd in case you can take a look! |
Yeah, despite the very misleading title, that PR was a little different in that it related specifically to the pages list. I've tested the steps described in this issue on WordPress 6.3-beta3-5619 with both Gutenberg 16.2 activated and deactivated and can reproduce using the Greenshift theme. Checked a few others. Porcupine works. Greenshift has a lot of block validation errors: So when I remove most of those blocks from the front page template, it loads emptytheme, 2023, 2022 load well. I tested by both:
|
Found where this block. It's in Woocommerce pattern which is called "Testimonial Single" |
Nice sleuthing @wpsoul The styles were introduced in #51545 here I think it should have added a deprecation cc @ajlende Here's the template: https://github.com/woocommerce/woocommerce-blocks/blob/trunk/patterns/testimonials-single.php Running this through 6.3 Beta: Content generated by <figure class="wp-block-image alignleft size-large is-resized has-custom-border is-style-rounded"><img src="https://s.w.org/images/core/5.8/portrait.jpg" alt="" style="border-radius:100%;width:164px;height:164px" width="164" height="164"/></figure> Content retrieved from post body: <figure class="wp-block-image alignleft size-large is-resized has-custom-border is-style-rounded"><img src="https://s.w.org/images/core/5.8/portrait.jpg" alt="" style="border-radius:100%" width="164" height="164"/></figure> |
Thanks @jordesign Confirmed, what I said above was bunk. Explanation here:
|
Thanks for the ping! I didn't have time to debug any of the deprecations, so I couldn't tell where it was coming from. I just leapt to a conclusion that the latest I'll try to test again. Deprecations turn my brain to mashed potato. |
So I think #52286 did introduce the validation error despite the deprecation. To test, add a v6 image block to a post via the code editor and save: <!-- wp:image {"align":"left","width":164,"height":164,"sizeSlug":"large","style":{"border":{"radius":"100%"}},"className":"is-style-rounded"} -->
<figure class="wp-block-image alignleft size-large is-resized has-custom-border is-style-rounded"><img src="https://s.w.org/images/core/5.8/portrait.jpg" alt="" style="border-radius:100%" width="164" height="164"/></figure>
<!-- /wp:image --> You'll see the deprecation warning.
Then remove the changes from #52286 diff --git a/packages/block-library/src/image/save.js b/packages/block-library/src/image/save.js
index 6fa8c6b234..95e8803dd6 100644
--- a/packages/block-library/src/image/save.js
+++ b/packages/block-library/src/image/save.js
@@ -58,8 +58,6 @@ export default function save( { attributes } ) {
...borderProps.style,
aspectRatio,
objectFit: scale,
- width,
- height,
} }
width={ width }
height={ height } The warning is gone. I suspect we need to migrate the markup changes, but it's tricky because the save function doesn't return a valid block, so I couldn't test things out with
I think we'd also need to add attributes and supports to the v6 deprecation? I've done a few deprecations in the past but I wouldn't class myself as an expert here. I might ask around. |
Closing this one because the Image block deprecation fixes were added to core in 6.3 RC2. Thanks everyone! |
I return back to my initial bug report. Tried actual 6.3 Nightly and bug is returned back One more time. If I have FrontPage template in block theme, Site editor must show Front Template on initial loading. Currently, it shows page from Settings - Reading - Homepage which has no sense because this page is not used on frontend side. |
Could you give details about the front-page template you're using? I've tested with the most basic set up, by creating a new <!-- wp:heading {"level":1} -->
<h1 class="wp-block-heading">Front page</h1>
<!-- /wp:heading --> And it always overrides the Settings > Reading settings in the editor and frontend. So I suspect it might be specific to the front-page template? |
Ok, so, the situation is even worse. If front-page.html uses just static content, it works. But if it uses patterns or template parts, it doesn't work
or
but if I copy content from header template part and insert it directly in front-page.html, then it works so, wp:pattern and wp:template-part (any of this) will break site editor initial loading. In the same time, if I select Front template in editor, then it works correctly |
I wonder if it's related to #52983 |
No. In my case, template is working if I open it in editor. Problem is only in initial loading which doesn’t show Frontpage if template has pattern |
The latest build made everything even worse. Now, it shows Front-page template on initial loading, but you can't edit anything in the content area |
Here's what I'm seeing: 2023-08-02.11.52.16.mp4Is this happening on other themes for you as well? |
Oh I think the fix was included in the latest round of cherry picking for 6.3: |
Description
As I understand, we have now two options in FSE themes: home.html template and front-page.html. If theme has home.html template, then Settings - reading option is used on front page of site. If front-page, then settings - reading is ignored and only front-page is used
In 6.3 beta, if theme uses front-page.html and if I visit /wp-admin/site-editor.php I see empty screen. And it looks like now it uses settings - reading setup which has no sense, because on Frontend side, front-page template is used.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: