Problem/Motivation

Serializable columns of single-value base fields are not unserialized, resulting in strings being set as field (property) values rather than the original data type.

The reason for this seems to be that SqlContentEntityStorage does not have any code that is supposed to unserialize this type of field. Similar code does exist for fields in dedicated tables, or shared data tables, though.

Proposed resolution

Add explicit support for the unserialization of fields of this type so SqlContentEntityStorage::mapFromStorageRecords().

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#2 drupal_2788023_2.patch1.35 KBxano

Comments

Xano created an issue. See original summary.

xano’s picture

Assigned: xano » Unassigned
Status: Active » Needs review
StatusFileSize
new1.35 KB
mglaman’s picture

My searching of the queue did not work out too well. I had opened #2788637: Values in shared table for SQL content entity storage do not get unserialized.. This makes loadFromSharedTables act like loadFromDedicatedTables for unserializing fields. We'll need a maintainer to make final call, but I believe it should be within the method which retrieves the data, not in mapFromStorageRecords

berdir’s picture

Status: Needs review » Closed (duplicate)

Yeah, I tend to agree to do it like #2788637: Values in shared table for SQL content entity storage do not get unserialized., either way, one issue is enough no matter which approach we chose and the other one is further along I think.