getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.27k stars 167 forks source link

Bubbles field preview always splits on commas #5800

Open rasteiner opened 11 months ago

rasteiner commented 11 months ago

Description

When the "text" of a select field is shown as preview in a structure field, that preview text is split up on commas.

Expected behavior
The preview of a select field should never be split

Screenshots

image

This is showing the text "Netherlands, Kingdom of the" which is a single value, but is represented as 2.

To reproduce

  1. Blueprint:
    fields:
    structure:
    fields:
      select:
        options:
          "Netherlands, Kingdom of the": "Netherlands, Kingdom of the"
  2. Create an entry and select Netherlands, Kingdom of
  3. Close the drawer
  4. See the preview

Your setup

Kirby Version 4.0.0 beta.2

distantnative commented 11 months ago

Sure this isn't even a v3 issue?

rasteiner commented 11 months ago

Sure this isn't even a v3 issue?

nope, haven't tested it in v3. It for sure is also a v4 issue

rasteiner commented 11 months ago

Edited the repro steps, as there is a different issue interfering....

options:
  type: query
  query: site.countries

site.countries returns an associative array like:

[
  'NL' => 'Netherlands, Kingdom of the'
]

But the select actually saves the value, and not the key, in the content file.

So the simplified reproduction would be:

fields:
  structure:
    fields:
      select:
        options:
          "Netherlands, Kingdom of the": "Netherlands, Kingdom of the"
afbora commented 11 months ago

Sure this isn't even a v3 issue?

Yes, this issue is valid also for v3.