Pennebaker / craftcms-thearchitect

CraftCMS plugin to generate content models from JSON data.
MIT License
171 stars 9 forks source link

Error on Exports > Fields > Last Item throwing foreach() error #57

Closed Emkaytoo closed 6 years ago

Emkaytoo commented 6 years ago

Tried to export an entire model and got the following error:

error-whole-model

Tried to export just a Neo field and the dependent fields, and got the following error:

error-neo-field-dependencies
Emkaytoo commented 6 years ago

After some testing, I've identified the LinkIt field as a culprit for the entrySources error.

Emkaytoo commented 6 years ago

When exporting all non-LinkIt and non-Neo fields, I get this error:

error-no-linkit-fields

After inspection of this issue, I found that there is a Freeform_Forms field, which the Architect doesn't currently support. Removed and got the Invalid argument supplied for foreach() error again.

Emkaytoo commented 6 years ago

After trying to export only the native Craft fields I continue to get the Invalid argument supplied for foreach() error.

FieldTypes in model:

Notes:

  1. I can successfully export the fieldTypes above individually without errors.
  2. I can successfully export two fields of the same type without errors.
  3. I can successfully export two fields of different types in the same group without error.
  4. I can successfully export two fields of different types in different groups without error.

Conclusion: It must be one of the individual fields configuration.

Emkaytoo commented 6 years ago

@spAnser Update: After checking the fields incrementally, I've found that the error is only appearing when the final field is selected, leading me to believe the forEach error isn't breaking properly.