studioespresso / craft3-seeder

Seeder is the easiest way to quickly create placeholder content while you're building out a website. Create your sections & fields and then let Seeder make entries for you.
https://plugins.craftcms.com/seeder
MIT License
28 stars 3 forks source link

Content populated in entries field should respect source/section setting #23

Open magnusskogen opened 3 years ago

magnusskogen commented 3 years ago

If I limit an entries field to a specific source (say "News"), Seeder does not respect this setting — it adds entries from all sections. Only tested this inside a Matrix, not sure if that has anything to do with it.

janhenckens commented 3 years ago

@magnusskogen could you post the full command you're using? Thanks!

magnusskogen commented 3 years ago

Sure! You mean this?

./craft seeder/generate/entries --section=project --count=10

janhenckens commented 3 years ago

Yes! So your section handle would be project in this case?

magnusskogen commented 3 years ago

Yes! Just to clarify my specific case: I have a Matrix, where one of the fields is an entries-field where the user can only select entries from the section "News". Seeder adds entries from all sections, not only "News".

Bcdo commented 3 years ago

To clarify further. If you have an entries field in general, that restrics what you can choose to relate with, it will disregard this restriction. So if your entries field has the restriction of only choosing entries to relate to in the channel of "news", the seeding will still be able to choose of all the other sections that are created, not only the entries in the "news" section.