I tested the non-CLI approach and converting a single classic post with a gallery appears to work as expected, so at least that part of the plugin is working as expected. I’ll test the CLI next.
In testing the CLI approach, I see the img src links properly getting populated. I noticed that on first load of the respective post in the block editor that an image placeholder is shown, but then it refreshes after a moment and the correct images are displayed (and thus their links appear when viewing in the code editor view within the block editor).
Did you give your sample post a moment to load-in/refresh and see that the images appeared as expected (and not just on first, immediate block editor page load)?
Thread Starter
MNetto
(@netto)
Thank you for taking the time.
While the bulk migration is running, I can see how each gallery block is created. Initially, the image placeholders are visible in the gallery, but shortly afterward, the actual images are rendered. But in the saved posts the image URLs are missing.
Maybe the process runs too fast and a delay could fix the problem.
When I manually open a post (with classic content + gallery) and immediately(!) hit save (command+S), the same problem occurs. Blocks are created, but gallery has no image URLs.
@netto are you able to share details on what your legacy gallery block post_content looked like? If its a custom gallery shortcode, then it likely will not work out of the box as a custom migration script would be needed to convert that classic content to blocks.
Thread Starter
MNetto
(@netto)
There are no custom gallery shortcodes. The posts are pretty much basic. Some text and sometimes one or two galleries. And it converts just fine, but not on bulk migrating.
This is how a typical legacy post looks like:
<h3>Lorem ipsum dolor sit amet</h3>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
[gallery ids="8663,8640,8666,8659,8657,8644,8654,8643,8642,8655,8641,8662,8665,8649,8647"]
Lorem ipsum:
[gallery ids="8679,8680,8681"]
I still suspect that the problem is caused by overly fast saving when bulk migrating.