• Hello!

    I’m doing some maintenance on an older blog, and I was trying to upgrade everything to the latest versions.
    I’m currently at WordPress 5.8.8 and using the Twenty Twenty theme v1.8.

    However, after upgrading, the “Gallery” blocks gets left aligned like this:

    Otherwise everything seems to work.

    I was also trying the newer Twenty Three/Four themes, but I could not find any options to display a list of posts with full content?
    Otherwise the site is stupid simple, It’s basically just all posts with full content in a list.

    The issue seems to be related to the WordPress upgrade, since I have the same issue even if I only upgrade WP, not the theme.
    If I only upgrade the theme, I’m just getting a white screen.

    Any idea about how I can solve this?
    Either by continuing with the 2020 theme, but if I can get it working using a later theme that works as well.

    Best regards, Emil

    The page I need help with: [log in to see the link]

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

    (@jordesign)

    Hi @sandnabba – taking a look at https://villa.sandnabba.se/2023/04/02/golvbyte/ I don’t see the issue at the moment – is that because you’ve rolled back to the older version of WordPress?

    If you’re able to upgrade again so I can see the issue in place – I’ll take a look to see if I can make any suggestions.

    Thread Starter sandnabba

    (@sandnabba)

    Hi @jordesign,

    Thanks for looking into this!

    Yeah, I did a rollback on the main page, but I just setup a copy on https://villa-dev.sandnabba.se/
    There I’ve done a full upgrade of both WordPress and the theme.

    EDIT: Interesting! On the latest post, it seems like only half of the image blocks got a broken alignment. If you scroll down a bit, some are actually in the right place.

    • This reply was modified 9 months, 2 weeks ago by sandnabba.
    Moderator jordesign

    (@jordesign)

    Thanks @sandnabb – that’s really helpful. It looks like that might be happening when there is no alignment set on the Gallery (as best I can tell).

    In either case – can you try adding this CSS code to see if it helps?

    .wp-block-gallery:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.aligncenter) {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    Thread Starter sandnabba

    (@sandnabba)

    @jordesign Awesome, thanks a lot!

    Yep, that did it. But… is this a bug in the theme, or in wordpress itself?

    I’ve not made any choices here really, while editing I’ve just clicked the + button, adding the gallery, adding images, and I’m done.

    But, I think I might have solved it without the extra CSS as well. ??

    Just to find the root cause, I removed the extra CSS and edited the page.
    Found that there was an “Align” option when clicking the gallery, that was set to “None”. I did set it to “Center”, updated the page and voila! That seem to have solved the aligment for all galleries, not just the one I edited.

    And now, even if I set it back to “None”, It still looks normal!

    So… problem solved? Thanks for pointing me in the right direction! ??

    EDIT: Well, it was only for that particular post. The extra CSS is still needed.
    Do you think I should report this somewhere?

    Best regards
    Emil

    • This reply was modified 9 months, 1 week ago by sandnabba. Reason: Found that it was still an issue on other posts
    Moderator jordesign

    (@jordesign)

    Hi Emil – as that seems to be an isolated case – I don’t think it needs to be reported anywhere.

    Glad to hear that solution worked for you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Gallery block get left aligned after 6.x update’ is closed to new replies.