vigetlabs / wordpress-site-starter

2 stars 0 forks source link

[Bug] Blocks "pattern placeholder" bug #90

Open nathan-schmidt-viget opened 1 month ago

nathan-schmidt-viget commented 1 month ago

Blocks

When starting a new site all of our custom blocks havepattern placeholder as the child block. This also shows up for the custom patterns that are using our blocks. The block then has nothing visible inside of it.

This shows up for all of our custom blocks

Screenshot 2024-05-28 at 9 17 57 AM Screenshot 2024-05-28 at 12 42 40 PM
nathan-schmidt-viget commented 1 month ago

Figured out what it is. When a new site is created the twig files don't get updated to the theme name. So they are still left as

{% set template = [
    [
        'core/pattern',
        {
            'slug': 'wp-starter/text-image-inner-blocks',
        }
    ]
] %}

When the slug should be 'slug': '[sitename]/text-image-inner-blocks',

Updating all the wp-starter in the Twig files fixed the problem.

nathan-schmidt-viget commented 1 month ago

Looked through the composer files, but could not pin point how to replace the string in the twig files. 🤔