Issue with Tailor and Repeater fields

Hello :slight_smile:

I often use the FormWidget “Repeater” in combination with dedicated yaml files. I currently try to rebuild some forms we built with plugins before in tailor. When adding a field to a tailor template, and using a repeater group referencing to a yaml file - I get an error.

I stepped into the code, and it just gives the string with the file name. It does not automatically import the fields, as in backend forms.

Is this something tailor is currently not supporting, or a bug somewhere else?

My Tailor Schema - PrivateBin

Hi and welcome @renick

This is something usually handled by mixins in Tailor. We could add support for includes in the way that you’ve described. Can you share the blocks.yaml file as well?

1 Like

I also could use mixins - but with the repeater group files, I also can share these fields with Static Pages – which would be quite handy to reduce code duplication :slight_smile:

May some more detail: Each project has this blocs.yaml - which also includes another elements.yaml. The first one is adding sections - and these sections can include theme-specific elements. These elements are hand-made minding customers corporate design. Like Call-to-Actions, Gallery, Headings.

So the admin user can use the same fields for creating pages, posts, custom models. Love it in combination with displayMode “builder” :slight_smile:

Group-File: PrivateBin

1 Like

@daft Hi. Any updates of this?
In latest OCMS I get the same error.

Hi @boarworm

I’m not sure if this is a bug. Can you share the blueprint definition?

Hi Sam.

Error the same, groups can’t use configuration file.

groups: $/acme/blog/config/fields_repeater.yaml

Error:

"foreach() argument must be of type array|object, string given" on line 90 of /home/user/projects/site.com/www/modules/tailor/contentfields/RepeaterField.php

I tried to use mixin but could not move all blocks to separate file (blocks.yaml).
Blueprints link - WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free

Yes you can’t use file-based includes at the moment and have to use mixins for blueprints.