Skip to content

Countries dictionary field does not persist disabled Emojis Option #13967

@Sm1lEE

Description

@Sm1lEE

Bug description

When configuring a dictionary field in a blueprint with type Countries and disabling the Emojis option, the change is not persisted correctly.

After clicking "Apply & Save", the Emojis option remains enabled instead of staying disabled.

How to reproduce

  • create a Dictionary field inside a blueprint
  • choose the Countries dictionary
  • disable the Emojis option
  • Apply & Save
  • open the field configuration again
  • Emojis is still enabled

Expected behavior:
The Emojis option remains disabled after saving.

Actual behavior:
The Emojis option is still enabled after saving.

Logs

Environment

Environment
Application Name: Statamic
Laravel Version: 12.51.0
PHP Version: 8.4.17
Composer Version: 2.9.3
Environment: local
Debug Mode: ENABLED
URL: disable-emoji-in-dictionary.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en

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

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

Storage
public/storage: NOT LINKED

Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.3.1 PRO

Installation

Fresh statamic/statamic site via CLI

Additional details

These are the two requests that get sent. It looks like the emojis configuration is missing in the second patch request.

/cp/fields/update

{
    "id": "main-0-0",
    "type": "dictionary",
    "values": {
        "dictionary": {
            "type": "countries",
            "region": null,
            "emojis": false
        },
        "type": "dictionary",
        "display": "Country",
        "width": 100,
        "localizable": false,
        "hide_display": false,
        "instructions": null,
        "instructions_position": "above",
        "listable": "hidden",
        "visibility": "visible",
        "sortable": true,
        "replicator_preview": true,
        "duplicate": true,
        "actions": true,
        "placeholder": "",
        "clearable": false,
        "max_items": null,
        "default": null,
        "handle": "country"
    },
    "fields": [
        {
            "handle": "country",
            "type": "inline",
            "config": {
                "dictionary": "countries",
                "type": "dictionary",
                "display": "Country",
                "width": 100,
                "localizable": false,
                "hide_display": false,
                "instructions": null,
                "instructions_position": "above",
                "listable": "hidden",
                "visibility": "visible",
                "sortable": true,
                "replicator_preview": true,
                "duplicate": true,
                "actions": true,
                "placeholder": null,
                "clearable": false,
                "max_items": null,
                "default": null
            },
            "fieldtype": "dictionary",
            "icon": "fieldtype-dictionary",
            "_id": "main-0-0"
        }
    ],
    "isInsideSet": false
}

/cp/fields/blueprints/forms/test_form

{
    "handle": "test_form",
    "hidden": false,
    "tabs": [
        {
            "handle": "main",
            "display": "Main",
            "sections": [
                {
                    "collapsible": false,
                    "collapsed": false,
                    "fields": [
                        {
                            "handle": "country",
                            "type": "inline",
                            "config": {
                                "dictionary": "countries",
                                "type": "dictionary",
                                "display": "Country",
                                "width": 100,
                                "localizable": false,
                                "hide_display": false,
                                "instructions": null,
                                "instructions_position": "above",
                                "listable": "hidden",
                                "visibility": "visible",
                                "sortable": true,
                                "replicator_preview": true,
                                "duplicate": true,
                                "actions": true,
                                "placeholder": null,
                                "clearable": false,
                                "max_items": null,
                                "default": null
                            },
                            "fieldtype": "dictionary",
                            "icon": "fieldtype-dictionary",
                            "_id": "main-0-0"
                        }
                    ],
                    "_id": "main-0"
                }
            ],
            "_id": "main"
        }
    ]
}

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