Kirby 3.2.3
Builder: 2.0.13
If you set up a builder field within site.yml and then attempt to view a fieldset preview, the panel throws an error message (also in the console) Cannot read property 'replace' of undefined.
The builder I tested is displayed below:
type: builder
label: Homepage
fieldsets:
homeBlock:
name: Block
preview:
snippet: block
fields:
heading:
type: text
label: Heading
And the preview snippet is as displayed below:
<section>
<?= $data->heading() ?>
</section>
When I moved the builder to a different blueprint (home.yml, specifically), everything works as expected.
According to the console, the error appears to be related to this specific line in /kirby-builder/src/components/BuilderBlock.vue:
https://github.com/TimOetting/kirby-builder/blob/master/src/components/BuilderBlock.vue#L194
Perhaps because there is no page ID associated with the site object? I’m not sure!