aerni / statamic-factory

Easily whip up fake content using Faker
https://statamic.com/addons/aerni/factory
MIT License
18 stars 4 forks source link

Add support for imported fieldsets #8

Closed aerni closed 2 months ago

Lenitr commented 2 years ago

I've been testing a bit with this addon in a new statamic project.

Right now it seems that whenever a fieldset is present in the blueprint (even when there's no factory settings for that fieldset), I get the error Undefined array key "field".

The only solution so far seems to be to comment out any fieldsets from the blueprint when running the factory.

Do you think it could be an easy solution to simply ignore any fieldsets (I think they can be recognised by the import key) for now?

Edit: Or maybe even better, ignore any fields without the field array key

aerni commented 2 years ago

That sounds like a reasonable workaround for now. Feel free to open a PR.

Lenitr commented 2 years ago

Allright, I'll try to do it (hopefully soon), I'll pass you a PR when it's done

aerni commented 2 months ago

Imported fieldsets will work with the next major release.