Cannot redeclare callFieldAPI()

Hello,

After upgrading a site that uses the Kirby builder plugin to the latest Kirby version , on the staging server I am getting this error:

Cannot redeclare callFieldAPI() (previously declared in /htdocs/site/plugins/kirby-builder/index.php:17)

…this was running on a pre-blocks version. Should I understand that blocks and Kirby builder can’t run side to side? or does this mean the builder plugin is built-in and I should remove it from the plugins folder? or perhaps something else?

I was under the impression that the blocks and the builder could co-exist side by side for now.

Thanks!

The builder plugin is not compatible with Kirby 3.5+

As far as I can see, a function callFieldAPI() is nowhere used in the Kirby core.

I think only the Editor plugin is not compatible, the Builder plugin should still work.

@ahmetbora Is that for sure? I thought it was only the Editor.

Hmm, I know so, but now I’m in doubt :sweat_smile:

@texnixe reference:

In any case, the new blocks and layout fields are supposed to replace the Builder and Editor plugins.

Hmm, I do not have the editor plugin installed on this site.

I do have the builder.

Surprisingly the error happens only on the staging server, but not on local, I wonder if it is related to content.

Is there any guide for a painless migration from the builder to , say, blocks ?

Thank you

Found the migration guide: Blocks | Kirby

As long as you don’t need previews, migration is really straightforward.

What you should probably consider is falling back to the default blocks where possible (i.e. rename your block types and adapt the blueprints). Then you can still use the default previews. Might be particularly interesting for galleries.

1 Like