Skip to content
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

Reserved field name for fields within a Set #2013

Closed
develth opened this issue Oct 16, 2020 · 5 comments
Closed

Reserved field name for fields within a Set #2013

develth opened this issue Oct 16, 2020 · 5 comments

Comments

@develth
Copy link
Contributor

develth commented Oct 16, 2020

Hi,

when using the field name name in a set and want to output it via 'record.name', it just outputs the set name.

But Documentation just talks about content:

Note, do not name fields inside a set with the name content. This is a reserved word for Bolt, because it is used to get a Record from it's field {{ myfield.content }}. You will not be able to access the field with name content inside a set.

Details

Question Answer
Relevant Bolt Version 4.1
Install type Composer install
BC Break no
PHP version 7.4
Web server Nginx

Reproduction

Specifics

Add Content-Type field:

copyright:
  type: set
  label: 'Copyright owner'
  fields:
    name:
      type: text
      label: Name
    website:
      type: text
      label: Webseite
      pattern: url

Steps to reproduce

Output in File:

{{record.copyright.name}}

Expected result

Given Input in Backend

Actual result

The Field-Name of the set: copyright

@develth
Copy link
Contributor Author

develth commented Oct 16, 2020

Bug or expected behaviour & missing in Documentation?

@I-Valchev
Copy link
Member

Expected behaviour and missing documentation.

@eduardomart
Copy link
Contributor

I reported this in the docs repo as well: bolt/docs#1111 (comment)

@I-Valchev
Copy link
Member

Proper checks in bobdenotter/configuration-notices#11

@I-Valchev
Copy link
Member

With an issue in bolt/docs and the configuration notices updated, let's close this issue here. Maybe in future we have another solution for it :-)

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

No branches or pull requests

3 participants