Inconsistent results for field values with caching

Created on 16 March 2023, almost 2 years ago
Updated 20 March 2023, over 1 year ago

Problem/Motivation

When caching is enabled there are different results for field values:

  • With cold cached the result is an object/array { value: 'Label' }
  • When cached the result is { 'Label' }

Steps to reproduce

Add a datalayer field configuration
Re-load page until it comes from cache
Datalayer variable is "flattened"

Proposed resolution

Maybe this points to an underlying issue in the entity cache, since somewhere in the process the (empty) "_attributes" array is removed

Removing the flattening code in `_datalayer_field_get_value` would be a workaround; it would also reduce complexity for when a field could have multiple values

Remaining tasks

  • Investigate what is happening in the cache layer
πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

miiimooo Europe

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024