Problem/Motivation

Fresh Drupal 11.0 install, ui_suite_dsfr theme.

On Layout Builder:

  1. I add a field using "Component per item" field formatter
  2. I pick a component
  3. In a slot, I add a FieldFormatterSource and configure it
  4. I save
  5. I reopen the field formatter configuration
  6. Sometimes, my FieldFormatterSource configuration has not been saved

The issue happens with:

  • Enttity Reference / Label / Link label to the referenced entity (a checkbox)

The issue doesn't happen with:

  • String / Plain text / Link to the Content (a checkbox)
  • Enttity Reference / Rendered entity / View mode (a select)
  • Boolean / Boolean / Output format (a select)
  • Datetime / Time ago / Future format (a textfield)

Proposed resolution

What's wrong with this specific field formatter ? The issue happens in all entity reference fields tested.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pdureau created an issue. See original summary.

pdureau’s picture

Assigned: Unassigned » just_like_good_vibes
pdureau’s picture

Title: [2.0.0-beta4] FieldFormatterSource: some settings are not saved » [2.0.0-beta5] FieldFormatterSource: some settings are not saved
just_like_good_vibes’s picture

i am still on it.

just_like_good_vibes’s picture

This one took me a lot of time, debugging and thinking. And finally, it seems to be there and working.
it solves a long-time side effect of incomplete submitted values in ui patterns 2' forms.

the best example is to take like a fieldFormatter with a boolean option, being true by default. it was impossible to save the false value.
now it is possible and much more!
WE need this so much :)..
Take any site configured with ui patterns 2. resave a component form, and look at the config.
the magic seems to happens now hahaha

please review, christian ? Pierre?

just_like_good_vibes’s picture

Status: Active » Needs review
pdureau’s picture

Assigned: christian.wiedemann » Unassigned
Status: Needs review » Fixed
pdureau’s picture

Status: Fixed » Closed (fixed)