New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required fields from other fieldsets being asked for #2068

Closed
dannyuk1982 opened this Issue Jul 18, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@dannyuk1982

dannyuk1982 commented Jul 18, 2018

This is a real weird one - 2.10.0:

I have a fieldset contact.yaml

sections:
  main:
    display: Main
    fields:
      foo:
        type: text
taxonomies: false
title: Contact
create_title: Contact

If I try and add a new page using this I get this error:

screen shot 2018-07-18 at 10 17 56

screen shot 2018-07-18 at 10 18 00

As you can see, there is no field called, hero - this is in another fieldset called hero.yaml which is included as a partial in other fieldsets, but not this one. Included for reference:

sections:
  main:
    display: Main
    fields:
      section_hero:
        type: section
        display: 'Hero Image'
      hero_image:
        container: main
        folder: /hero/
        restrict: false
        type: assets
        instructions: 'The large image at the top of the page'
        display: 'Hero image'
        validate: required
      column_1:
        settings: Medium
        restrict_assets: true
        type: redactor
        width: 50
        display: 'Column 1'
      column_2:
        settings: Medium
        restrict_assets: true
        type: redactor
        width: 50
        display: 'Column 2'
taxonomies: false
title: Hero
create_title: Hero
hide: true
@dannyuk1982

This comment has been minimized.

dannyuk1982 commented Jul 18, 2018

OK... so if I take the hero.yaml partial fieldset out of default.yaml it no longer comes up with the error. Seems like the validation is reading default.yaml all the time?

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented Jul 18, 2018

Nice find 👌

@dannyuk1982

This comment has been minimized.

dannyuk1982 commented Jul 18, 2018

It was literally the first thing that happened when I started using 2.10 haha, bug finder genes!

@jasonvarga jasonvarga closed this Jul 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment