-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
.is-layout-flex
broken
#45713
Comments
Same as utility classes for “is-horizontal”. In 6.0, they just didn’t work on rows. I suppose this is coupled to the fact that group and row are variations of the same block. It is creating complexity that shouldn’t be there, and now in 6.1 there is again a new utility class. But the underlying problem is not solved. For a major structural layout block, a setting that is used in every site I ever built with WP FSE, it is demotivating to again have unreliable layout blocks, making updating from 6.0 to 6.1 annoying. I reported this in #43665. One guy confirmed it, but then nobody else noticed this, nothing happened with it, and here we are in 6.1 with the same problem. |
This is another ticket reported on the core track: https://core.trac.wordpress.org/ticket/57007 |
@t-hamano has done some more investigation on this. See the latest comments here. It looks like this might be related to caching, perhaps related to the caching issues we tackled right before the release of 6.1. @Mamaduka @ockham any thoughts? |
I looked through that thread, and indeed have the new separate asset loading. I doubt however that this would interfere with the output of utility classes. It is also no classic theme. |
Was anyone able to reproduce this issue? The themes can opt-out the base layout styles. I wonder if this is the case with the reports. |
@Mamaduka That wasn't added until v6.1, and the original Trac thread came about because upgrading to v6.1 caused the issue. In my case, I didn't get |
Thanks for the ping. I haven't been able to reproduce the issue outside of dequeuing the global styles stylesheet. The PR that introduced the change to where layout styles are output was #40875. Prior to that PR, all layout styles were output at render time for each individual block, which resulted in duplicate and redundant styles (this issue: #41434), particularly for posts with a large number of blocks. The base For themes that opt out (either via dequeueing or an explicit opt-out), they'll be responsible for providing their own layout styles. When using core blocks that depend on layout styles, my recommendation would be to not dequeue or opt-out, but rather either use the provided CSS as-is, or add a |
I am able to reproduce this issue using the core Twenty Twenty Two theme in 6.1.1. |
Hi, this question reported in the support forums seems to be also related. The user has mentioned using the theme Hestia. Looking at the theme's code, I can't find where it could be "opting out" from base layout styles (neither Is there any other way to dequeue those styles? EDIT: I couldn't reproduce the problem with that theme, and also, |
Another instance of this issue reported here. |
Thanks for the additional reports folks (and please do continue to drop comments here when folks report the issue). So far I haven't been able to replicate this problem outside of manually dequeueing global styles, so at least at face value, it does sound like it could be a potential caching problem of some kind if the problem is appearing on themes that aren't doing that dequeuing. I'll just ping @spacedmonkey and @oandregal for visibility in case this issue rings any bells with the recent changes to global styles caching? I personally don't have the best grasp of how the object caching and transients behave, but happy to help investigate as needed. |
Update: I'm still unable to reproduce this in any of my environments. Based on the reports so far, outside of themes or plugins that explicitly switch off global styles output, I'm leaning toward suspecting that this is likely a caching issue of some kind. I see that there is currently work to adjust the caching of global styles over in #45679 and related PRs. For visibility, I'll just ping some of the folks who worked on and reviewed that PR, in case folks can offer any insights into global styles caching, or caching invalidation that needs to be adjusted: @mmtr @spacedmonkey @oandregal @felixarntz @geriux @tyxla To recap on the feature that is not outputting correctly in these reported cases:
In the reported cases (outside of themes or plugins that switch off global styles), it sounds like the style output works when On my mind is that the core Can anyone shed any more light on this? Unfortunately, I haven't been able to find anything more concrete than these suspicions based on inferences from the reports so far, and am unsure what else to investigate. |
Since WordPress 5.9, the global styles stylesheet has been cached for 1 minute. So, I suppose the following could happen:
Is this what people are experiencing? If so, I'm sorry to say that I don't have much advice other than wait for a minute. Though judging by the reports it seems the issue is persistent? The current state of caching the global styles stylesheet is unfortunate. Coincidentally, we have been working on fixing it. #45679 has landed recently, and will be part of Gutenberg 14.7. It properly updates the styles upon certain events (core, plugins, or themes are updated, theme switch, etc.). |
Yeah, it's definitely persistent, I'm afraid 😕 |
Let's maybe try to gather more information from the affected users so we have a better shot at reproducing this? I'm thinking e.g. which theme they're using, list of active plugins -- anything else? We can maybe post a message like the following to the form threads:
Here's the list of forum threads and Trac tickets I've found referenced in this issue. I'll wait for feedback from y'all and will then post the message to those threads.
|
For the record, I tested with some of the themes I see people using (e.g.: poseidon), as well as other default themes. I tested with and without Some information that can be useful to share with people to gather information and pinpoint the issue is whether those sites have the
|
Thanks for the discussion, folks, and for re-testing! Great idea asking for more info from the users who report the issue:
Possibly which hosting provider they're using, if it's an okay thing to ask. Some managed hosts run a bunch of caching or MU plugins that are invisible to the user, and could potentially be doing things behind the scenes that could break things. For example, I wonder if it's happening on sites that configure their own object cache that gets used by get/set transient (though in theory you'd think the timeout would still be working in that case) 🤔 |
That's interesting. If they don't respect the timeout, it can certainly be the case. If so, #45679 (Gutenberg 14.7) will fix it. I don't presume we can ask people to use the plugin, but perhaps this issue warrants a strong argument to release a WordPress 6.1.2 with that PR? |
Thanks @oandregal and @andrewserong! Here's an updated draft that I'll send out shortly:
|
When skimming over 56970, I found this latest comment:
Personally, I haven't been able to reproduce that that triggers the |
We've gotten one reply so far: https://wordpress.org/support/topic/gallery-blocks-show-vertical/#post-16242639, answering all the questions we've asked. Highlight:
Based on that, we might want to come up with a plan to get a fix into Core and release a 6.1.2. Since we haven't been able to reproduce ourselves, it'd be great if we could confirm that it's indeed #45679 that fixes the issue. Maybe we can isolate that into a tiny plugin and ask folks to test that? |
Another highlight from that one: The So, from my perspective, this appears to be consistent with the idea that caching is the culprit. I've done a re-read of the layout code a couple of times, and nothing else appears to jump out at me so far. |
Hello, just wanted to chime in:
Whats peculiar is, that on a different instance where I run the exact same theme, same plugins and even same server setup (they are literally in the same virtual server with all settings identical) the issue has not appeared after updateing to 6.1.1 ... the only thing that is different on this instance is, that the content was added while running 6.0.x and not earlier (some 5.x version) of wordpress. EDIT: sorry, it is the other way around. The working instance has content that was added pre WP6, the non-working instance has content that was added while running WP6.x Hope this helps. Plugins I use: |
Also reported in this forum thread: They have added custom CSS to work around the issue in the meantime. User's theme: Astra Pro Version 3.9.3 User's plugins: Astra Widgets Version 1.2.12 Inline CSS
One odd thing to note: as a test, they created a full copy of the entire site via the Duplicator plugin. On that fresh copy of the site, the related lines of inline CSS are not missing and their galleries look fine. This adds fuel to the idea of this being caching-related. They have not yet activated the Gutenberg plugin as they have some concerns that it might affect the site if uninstalled, so I don't know if the potential fix there would work for them. |
I'm seeing the same issue. In production, hosted on a dedicated nginx server with caching the flex layout is not applied, the inline style for "is-layout-flex" and "is-layout-flow" are missing from frontend. The same site / code downloaded to "Local" by Flywheel on my Mac works. This points to a hosting-specific issue unrelated to theme or plugins. Theme: custom child theme of Storefront Missing on production site:
|
Thank you, all, for your reports on this issue 🙌🏻 If you have experienced this issue on your site, please read on... 👀If you are comfortable testing a hotfix plugin to address this apparent caching issue, please see this plugin testing info in Trac. The plugin can be tested on sites before or after upgrade to WordPress 6.1.1. Feedback regarding the hotfix is much appreciated! How it works in various environments will help decide how soon a permanent fix is shipped. |
@ironprogrammer thanks for the fix! I have several affected instances so I was able to do some testing https://core.trac.wordpress.org/attachment/ticket/56970/wp-hotfix-56970.zip only works while it is installed, as soon as I uninstall it the buttons are again left aligned https://core.trac.wordpress.org/attachment/ticket/56970/wp-alt-test-56970.zip seems to work permanently even if I uninstall and delete it after. Retestet after 5 minutes in incognito session and still works. |
Hi, |
Using WP 6.1.1, our hybrid theme (uses blocks but not theme.json) still sees this issue... CSS is missing for is-layout-flex and similar classes. https://core.trac.wordpress.org/attachment/ticket/56970/wp-hotfix-56970.zip fixes the issue while active. https://core.trac.wordpress.org/attachment/ticket/56970/wp-alt-test-56970.zip does not fix the issue at all. |
I can confirm the same result as @ja-sk https://core.trac.wordpress.org/attachment/ticket/56970/wp-hotfix-56970.zip https://core.trac.wordpress.org/attachment/ticket/56970/wp-alt-test-56970.zip Bit of background: the bug occured with the installation of an old standing customer, the theme is from 2015 and hasn't been touched in years. So there's no theme.json and no theme support toggles for any global stylesheets or anything that came in the last two or three years, I'd say. The customer keeps WordPress and the plugins updated herself and noticed now that the styles are missing when using the galeries. Thanks for the hotfix! 🤞🏻 |
Same problem here: CSS is missing for is-layout-flex and similar classes. Block editor and theme.json in use, but Site Editor isn't. Turning on |
Just wanted to note that this issue should be resolved with WordPress/wordpress-develop#3712, which is scheduled for 6.2. |
Thanks Nick! |
Once 6.2 Beta 1 is out next week, we should retest this issue and confirm that everything is fixed. I will leave this issue open until Beta 1 is out, and everyone has had a chance to test. |
Hey, everyone 👋 The WordPress 6.2 Beta 1 was released this week. I wanted to check if you had a chance to retest and confirm the fix. |
Rules for
Never mind; I was looking on the wrong element. There are rules for |
Thanks for testing, @markhowellsmead 🙇 |
It looks like we are all set on this one. I am going to close out, but if anyone continues to experience issues, please feel free to reopen. Thanks! |
Hey :) everyone, WP 6.2. FSE. Own theme. It works in the Site Editor but does not in the Post Editor - .is-layout-flex is missing. Deactivating all plugins and using the default theme does not solve the problem. If I raise a new empty site - everything is in order. Magic. |
I take back my words that everything is fine on the new empty site. Actually, no. Theme: clear Twenty Twenty-Three
|
Thanks for the update, @goodpenguins:
Would you please clarify if disabling theme styles in the editor affects the flex styling in the site frontend (as described in the issue)? This original report related to a frontend caching problem, but in my testing the frontend appeared unaffected by the editor preferences change noted here. |
Hey :). Thank you for your reply. The problem only in the Post Editor, Template Editor and frontend are ok. I am sure the issue does not related to the cache. |
Description
As originally reported in Core Trac#56970:
Step-by-step reproduction instructions
In reviewing during the 6.1.1 bug scrub on 10 November 2022, there were no clear reproduction steps nor ideas on the cause of the issue. As @hellofromtonya noted: "The tweak in Customizer is a workaround rather than a fix. The root cause may be in the global styles when working with classic themes. But not sure. Needs more investigation and likely more details." and as @sabernhardt noted: "I think the class styles belong in the block-library stylesheet, but I don't know why global styles do not always include these styles."
Screenshots, screen recording, code snippet
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: