While using SCALD's atom reference field within a paragraph (paragraphs module), I've noticed that the Atom's Representation context is not accurate when returning to the paragraph's edit form. The value is properly saved, but the form state is not accurate when editing the paragraph.

To replicate the issue:

paragraphs module
- atom reference field (allowing contextual override)
- set the paragraphs form to 'collapsed' by default.

I'll see if I can track down more details, but it sounds related to this issue

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

willito created an issue. See original summary.

willito’s picture

Title: Representation context not loaded on DND form » Representation context not shown on atom reference field
nagy.balint’s picture

You can test if that patch solves your issue.

mario_prkos’s picture

The problem apear when paragraph calls validation function field_attach_form_validate and then that function calls the field_default_extract_form_values. In that case values from the field settings are replaced by the value from form which is already serialized array. The proposed patch instead of try to unserialized already serialized array just take the existing values of items.