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

Invalid value assignment for blueprint select element #6764

Open
gbdesign2023 opened this issue Oct 18, 2024 · 0 comments
Open

Invalid value assignment for blueprint select element #6764

gbdesign2023 opened this issue Oct 18, 2024 · 0 comments

Comments

@gbdesign2023
Copy link

It was like looking for a needle in a haystack until I found the error 😮‍💨

I have expanded the list blueprint. The selectable value is used for a CSS class. But from number 10 onwards, there is a phenomenon were not the value, but the description is written in the TXT. This also happens with number 99. It also is not significant whether the value is written with or without quotation marks.

I was able to reproduce the error in a fresh starterkit with Kirby 4.4.1.

site/blueprints/blocks/list.yml

name: field.blocks.list.name
icon: list-bullet
wysiwyg: true
preview: list
fields:
  text:
    label: field.blocks.list.name
    type: list

  liststyle:
    type: select
    options:
      "01": "List 01"
      "02": "List 02"
      "03": "List 03"
      "10": "This description should not be here"
      "99": "That is wired"
    default: "01"

For example, if I select “10”, this is the result in the TXT file:

[…]

"blocks":
[
  {
    "content":
    {
        "text":"<ul><li>Test</li></ul>","liststyle":"This description should not be here"
      },
        "id":"40945ac7-b158-462d-baa9-eba3bda84cfe",
        "isHidden":false,
        "type":"list"
  }
]

[…]

But this should be output: "liststyle":"10"

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

No branches or pull requests

1 participant