Skip to content

Embedded inline entry within table in RTE not being resolved in returned fields  #265

@haydnsimons

Description

@haydnsimons

When calling CDAClient.fetch method to retrieve a piece of content from Contentful which includes an RTE with a table which includes embedded inline entries in it, these entries aren't resolved to CDAEntry objects as they are elsewhere. I've written a demo application below to show exactly what methods i'm using.

import com.contentful.java.cda.CDAClient;
import com.contentful.java.cda.CDAEntry;

public class Application {

private final static String TOKEN = "PERSONAL_ACCESS_TOKEN";
private final static String SPACE = "SPACE_ID";
private final static String ENVIRONMENT = "ENVIRONMENT";

    public static void main(String[] args) {

        CDAClient client = CDAClient.builder()
                    .setSpace(SPACE)
                    .setToken(LIVE_TOKEN)
                    .setEndpoint("https://cdn.contentful.com/")
                    .setEnvironment(ENVIRONMENT)
                    .build();
                    
        cdaEntry = client
        .fetch(CDAEntry.class)
        .include(10)
        .one(entryId);
    }
}

Example

In the example below I have a RTE which contains a list with an embedded inline entry and also a table which contains two embedded inline entries, one in the header cell and one in the cell below:

a1

This returns:

a2

Which looks correct so far (CDARichParagraph, CDARichUnorderedList, CDARichTable, CDARichParagraph & CDARichParagraph)

When you dig further in to see the embedded inline entries, you can see that the one within the CDARichUnorderedList shows as a CDAEntry object as expected but the one within the CDARichTable still shows as raw data (LinkedTreeMap which contains a target)

a3

This is currently preventing us using embedded inline entries within tables within an RTE.

Could you confirm this is an issue and keep me updated on when it may be resolved?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions