contentful.java icon indicating copy to clipboard operation
contentful.java copied to clipboard

Asset data is populated only under the raw data of the entry content, while structured fields miss that data under the CDARichEmbeddedBlock

Open drezzzik opened this issue 6 years ago • 2 comments

Version of the library: 10.4.1 Screenshot attached: Screen Shot 2019-09-18 at 11 18 22 As you can see, the data object is empty for CDARichEmbeddedBlock whilst it could be found under rawFields.

Nice to have: CDARichEmbeddedBlock::data is Object. Would be convenient to have all that sys structure with id, linkType and type in there.

Any field which is Media type behaves the same, data is missing in entry.fields while present in entry.rawFields.

drezzzik avatar Sep 18 '19 09:09 drezzzik

+1

denrase avatar Sep 18 '19 13:09 denrase

Seems that source of the problem is next: 1st case: client.sync(SyncType.onlyEntriesOfType("someContentType")).observe().blockingFirst()​.entries() 2nd case: client.sync().observe().blockingFirst().entries.filter { it.value.contentType().id() == "someContentType" }

Result is not the same. If the filtering is done by SyncType, problem described above is reproducible. For the 2nd case, issue is not repro, and both rawFields and fields contain same data.

drezzzik avatar Sep 25 '19 13:09 drezzzik