Skip to content
This repository was archived by the owner on Jul 5, 2022. It is now read-only.
This repository was archived by the owner on Jul 5, 2022. It is now read-only.

Error when attempting to preview builder used in site.yml #136

@piperhaywood

Description

@piperhaywood

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions