Skip to content

Width field - New items are added to YAML as strings #11035

Open
@pdipatrizio

Description

@pdipatrizio

Bug description

The default items on a Width field are saved in YAML as numbers, but newly added items are saved as strings.

handle: column_width
  field:
    options:
      - 25
      - 33
      - '42'
      - 50
      - '58'
      - 66
      - 75
    default: '50'
    type: width
    display: 'Column width'

How to reproduce

  1. Add a Width field to a fieldset.
  2. Add new items (e.g. 42 and 58)
  3. Save
  4. View the fieldset's YAML.

Logs

No response

Environment

Environment
Application Name: Example
Laravel Version: 11.27.2
PHP Version: 8.3.12
Composer Version: 2.7.7
Environment: local
Debug Mode: ENABLED
URL: Example.test
Maintenance Mode: OFF
Timezone: America/Los_Angeles
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: mysql
Logs: stack / single
Mail: sendmail
Queue: sync
Session: file

Statamic
Addons: 9
Sites: 2 (Default, Customers)
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.30.0 PRO

Statamic Addons
codedge/statamic-move-entries: 1.3.0
goldnead/statamic-toc: 1.5
jacksleight/statamic-miniset: 1.1.2
mitydigital/feedamic: 2.5.0
rias/statamic-color-swatches: 2.3.0
rias/statamic-link-it: 2.4.0
rias/statamic-redirect: 3.8.1
stefangalescu/statamic-heroicons: 3.0
visuellverstehen/statamic-classify: 3.0.0

Installation

Starter Kit using via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions