Site logo

[Resolved] Gallery problems after update to WP 6.1

Home Forums Support [Resolved] Gallery problems after update to WP 6.1

Home Forums Support Gallery problems after update to WP 6.1

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #2397910
    Gerald

    Hi,

    I’m using generate press pro. After doing the wp update (6.1) this morning, my galleries don’t work fine anymore.

    I did 3-column-galleries, which are shown in the backend. In the frontend there are only one-column-galleries, with no gap between the photos.

    Switched my website to another theme. No problems with the presentation of the galleries.

    For example – here is a link, where you can see my problem:

    https://music-on-net.de/johanna-borchert-jazz-and-the-city-2022-fotos/

    Hope, you can help.

    Best regards Gerald

    #2397928
    David
    Staff
    Customer Support

    Hi there,

    if you edit that gallery block, and check its block settings, what are the settings set to ?

    #2397949
    Gerald

    Hi,

    set to 3 columns.

    Possible to send you a screenshot?

    #2397966
    David
    Staff
    Customer Support

    What happens if you change that setting and save the page ?

    #2398006
    Gerald

    It’s the same problem.
    At the moment you can see in the backend two columns, in frontend one column on the left side.

    #2398076
    David
    Staff
    Customer Support

    Odd, so the core blocks load some of their global styles inline in your site.
    I can see that inline style loading on your site but its missing this:

    
    body .is-layout-flex {
        display: flex;
        flex-wrap: wrap
    }

    If you have an cache plugins or server side caches, can you try clearing them?

    If its still an issue the add the above CSS to your site.

    #2398101
    Gerald

    Hi David,

    after adding the css: it works!

    Thank you for your help!

    Best regards

    Gerald

    #2398204
    David
    Staff
    Customer Support

    You’re welcome!

    #2399446
    J

    Hi,

    Same problem here. At least 4 websites with the same problem.

    Adding the extra CSS solved the problem.

    Now I wonder what caused the problem?

    J

    #2399578
    David
    Staff
    Customer Support

    Its not the first time a WP update has messed with the core blocks styles or HTML. And the Gallery block has been one to change several times now.

    What happens if you add a new Gallery block to a test page without that CSS being added ? Does that one load correctly ?

    #2409394
    J

    So when I add an new Gallery block to a test page without that CSS being added, the page does not load correctly.

    Expected behaviour: gallery in three columns on desktop

    Actual behaviour: all images in one column without any padding

    #2410126
    David
    Staff
    Customer Support

    What i do understand is that WP 6.1 moved certain block specific CSS styles into helper classes such as is-inline-flex.
    And the relevant styles are loaded by WP in the global-styles-inline-css stylesheet inline in the <head> of your site.

    And those styles for me have updated correctly on every site i maintained that i upgraded to 6.1
    In yours and the OPs instance it seems that is not the case, and the styles are missing.

    Thoughts ….
    On a block based theme, the content of the global-styles-inline-css can be dictated by theme.json, on a traditional PHP theme like GP, that is not the case.

    So – question do you have any custom functions on the site related to Theme Supports or theme.json?

    #2422588
    Franz

    I had the same issue, and even more weird at the galleries did show up correctly when I’m logged in but did break for not-logged-in users.

    My solution that eventually works is putting the css for body .is-layout-flex into the “custom css” area of the (child-)theme’s customizer.

    #2422699
    David
    Staff
    Customer Support

    Glad to hear that.
    Question – are you using Autoptimize or any other optimization plugins that disable the core Block Library Styles ?

    #2422718
    Franz

    I’m using the “Asset CleanUp Pro” plugin with a pretty complex configuration. So just to be sure I don’t overlook anything, I completely disabled the plugin for testing purposes and the gallery issue was still there.

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.