This is a generic fixer that fixes image blocks that are not pointing to an attachment ID. Those blocks become really hard to work with the for publisher, because it's not pointing to the media library. This finds those blocks and fixes them.
The wp newspack-content-migrator attachments-repair-img-blocks-w-no-id command is added. It currently only takes "num items" as an arg, but we can add to that when we need it.
This is a generic fixer that fixes image blocks that are not pointing to an attachment ID. Those blocks become really hard to work with the for publisher, because it's not pointing to the media library. This finds those blocks and fixes them.
The
wp newspack-content-migrator attachments-repair-img-blocks-w-no-id
command is added. It currently only takes "num items" as an arg, but we can add to that when we need it.How to test
You need a broken block. Something like this:
The image should be in the media library already. If it's not the code will try to import it. Now run the command above.