From “Partridge Sky” by Huang T’ing-Chien in Sunflower Splendor: Three Thousand Years of Chinese Poetry, edited by Wu-Chi Liu and Irving Yucheng Lo:
The chill of dawn grows on the tips of yellow chrysanthemum twigs.
In this life, don’t let the winecups be dry!
Before the wind, play the flute aslant in the rain;
When drunk, pin flowers on the hat and wear it upside down!
While my health remains,
Let me eat well,
And enjoy dancing skirts and singing castanets to the full!
Let the yellow flowers and my white hair entangle each other
To make a spectacle for the scornful eyes of my fellow men!
Stone I got, sweaty from the hill climb,
crystal stone put out its white bud.
I planted that stone by the chrysanthemums.
Under the yellow chrysanthemums mother planted and grew,
I set my stone down too, every morning
gave it water to make it grow.
I’ve split a batch of thirty-three yellow mum photos between this post and the next one, since they were taken in two different locations with very different lighting conditions. These sixteen were from a spread spilling over an ancient Victorian stone wall — possibly made of stone donated to the city by Queen Victoria (in my imagination) — and were brightly backlit with splashes of sunlight filtering through nearby trees. With the sun in my eyes and the shadow/sun contrasts, I may have missed precise focus on a few of these. If they appear that way to you too then let’s just say it was intentional and the correct way to see them is not that they’re blurry, but that their glowing softly — which is a much more artistic(-sounding) choice, yes?
If you’re interested in learning about a problem I found with galleries on some of my blog posts and a solution, read on. Otherwise, skip down and enjoy the photos!
When working on my most recent Christmas project, I happened to take a look at some Christmas posts from previous years, and discovered that the galleries weren’t working correctly. When I clicked the first image in a gallery, WordPress didn’t show the carousel with the option to move forward to the next image in the gallery — but instead displayed only a single image. To see what I mean, go to Eight Days to Christmas: Red and Green from 2021, select the first image in the first gallery — and notice that you can’t page to the next image in the gallery (and you’ll have to use the browser’s back button to return). I randomly checked a few other older posts and found that they had the same problem: the carousel wasn’t working correctly on many of them. Because I was in the middle of the current Christmas project, I didn’t try to determine what was going wrong — until yesterday when I spent a couple of hours sorting it out.
Once upon a time, the code behind a WordPress site was a lot simpler; and with a smattering of HTML knowledge (which is all I have), I could often figure out why some problem was occurring. As WordPress continued to grow up and especially with the introduction of the Gutenberg or Block Editor, the underlying code got a lot more complicated, with much more scripting and CSS used to format and present a site. All that code is mostly unreadable to me… and yet I try not to be intimidated by tech-stuff I don’t understand, so…
I picked one of the offending posts and brought it up in the Post Editor to see if I could identify what was wrong, previewed it and noticed that the problem had corrected itself. This would seem like a good thing, you might think — but it didn’t help me understand what was wrong, nor how many posts might be affected. So my next step was to compare the code between a newer post that was working correctly and an older one that wasn’t (by using the View Source or Show Page Source function of a browser). Here, for example, is a snippet of code that displays a single image from a gallery:
Nobody knows what this code does (haha!) — and I certainly can’t explain it, but I did recognize that it was part of the gallery/carousel functionality on my site. Vaguely speaking, WordPress generates code like this for each image in a gallery so that you can do things like change the size, background colors, borders, or captions for individual images separately even when they’re part of the same gallery.
In this screenshot I highlighted a bit of code on the third line — < ul class=”blocks-gallery-grid” > — because I noticed that if I looked at the code for a carousel that was working correctly, this bit did not appear. So whatever it did or was originally designed to do, it had apparently been deprecated — and would get removed from a post when I updated it in the WordPress editor, after which the carousel would work as it was supposed to.
It can be difficult to sort out problems with images and galleries on WordPress, mainly (in my opinion) because people use words like gallery, slideshow, and carousel interchangeably and imprecisely, so searching for solutions just sends you down endless rabbit holes. But now armed with something I could work with that I knew was part of the problem — the code < ul class=”blocks-gallery-grid” > — I found this article that describes how WordPress 5.9 introduced a new structure for galleries, and that existing galleries would only be migrated to the new structure when a post was updated with the editor.
I also gathered from this article (much of which made little sense to me) that theme designers could have mitigated the problem for earlier galleries (see the “Backwards Compatibility Considerations” section) — which means you may not have the same dysfunction with these galleries on your site, if the theme developer updated your theme to account for the change. Mine didn’t, and apparently others didn’t either: I picked a few themes at random from the WordPress theme directory, and they all failed to display the older galleries correctly, in some cases not even responding when I clicked on a gallery image.
All this explains why galleries on my older posts don’t work right but new ones are fine — but I don’t know how any non-technical WordPress blogger would have known about this when the change was made and that they might need to do something because of it. Does anyone go back and check older posts when WordPress updates come out? I know I don’t — though I may from now on — and it was two years before I stumbled on the problem on my own site.
Ah, well, “to fix or not to fix” is now the question. If I go to “All Posts” on my WordPress dashboard and search for “blocks-gallery-grid” (include the quotations marks, if you try this on your own site), I learn that there are 101 posts from 2022 and earlier that will all fail to display the galleries correctly. That’s a lot! And each one will need to be opened in the post editor, re-published, then checked to make sure nothing else went wonky. So on the one hand, the broken galleries will nag me and haunt my dreams until I do something about them; on the other hand: waaaaahh! I don’t want to!
But I probably will fix them… maybe I can teach The Dog to do it… wish me luck!
Thanks for reading and taking a look!