You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a rich text field that has one entry "X" and that appears multiple times, once as inline and once as embedded block, When it is serialized as a Document in the SDK It should have a Data.Target of the IContent nodes of entry "X"
Actual:
The first IContent node has a Data.Target instance of JObject that can be serialized as 'entry "X"'
The second IContent node has a Data.Target property of null
Expected:
Both IContent nodes hava a Data.Target instance of JObject that can be serialized as 'entry "X"'
Detail information / steps to reproduce
Given Contentfull content type:
{
"name": "Rich Text example",
"description": "Demo content model to generate a rich text example.",
"displayField": "internalTitle",
"fields": [
{
"id": "internalTitle",
"name": "Internal title",
"type": "Symbol",
// other omitted for brevity
},
{
"id": "text",
"name": "Text",
"type": "RichText",
"localized": false,
"required": true,
"validations": [
{
"enabledMarks": [
// all, omitted for brevity
],
"message": "Only bold, italic, underline, code, superscript, and subscript marks are allowed"
},
{
"enabledNodeTypes": [
// all other node types enabled, omitted for brevity"embedded-entry-block",
"entry-hyperlink",
"embedded-entry-inline"
],
"message": "a custom error message"
},
{
"nodes": {}
}
],
"disabled": false,
"omitted": false
}
],
"sys": {
// omitted for brevity
},
"id": "richTextDemo",
"type": "ContentType",
// Other properties omitted for brevity"urn": "crn:contentful:::content:spaces/{spaceId}/environments/develop/content_types/richTextDemo"
}
}
In Contentful prepare an instance of richTextTyDemo and add an "embedded-entry-inline" entry that references an other content type instance and add an "embedded-entry-block" that references the same content type instance.
When execute a query with a valid entryId like this:
Not sure if this is the root cause in this particular scenario, but setting a content type resolver and also potentially ResolveEntriesSelectively might resolve the issue.
Scenario:
Given a rich text field that has one entry "X" and that appears multiple times, once as inline and once as embedded block,
When it is serialized as a
Document
in the SDKIt should have a
Data.Target
of theIContent
nodes of entry "X"Actual:
The first
IContent
node has aData.Target
instance ofJObject
that can be serialized as 'entry "X"'The second
IContent
node has aData.Target
property ofnull
Expected:
Both
IContent
nodes hava aData.Target
instance ofJObject
that can be serialized as 'entry "X"'Detail information / steps to reproduce
Given Contentfull content type:
This type can be serialized as dotnet type:
In Contentful prepare an instance of richTextTyDemo and add an "embedded-entry-inline" entry that references an other content type instance and add an "embedded-entry-block" that references the same content type instance.
When execute a query with a valid
entryId
like this:The result of this query should be:
result
is not null and of typeRichTextDemo
=> trueresult
has a propertyText
of typeDocument
and is not null => trueText
has twoIContent
nodes with aData.Target
propoerty that can be serialized to that referenced instance => falseThe first
IContent
node has a serializableData.Target
.The second
IContent
node has aData.Target
that isnull
.I suspect that the error is in the
ContentfulClient
between Line 233 and Line 271.The text was updated successfully, but these errors were encountered: