At this moment I have a DD4T 2.2 .NET webapplication which uses the DXA Model Service (SDL Web 8.5). All my fields are working, except for the Multimedia fields.
The image property in the ViewModel object is null:
My model looks like this:
But the item is also not available in the Component object:
Model Service calls:
The following calls are done from the webapplication (captured by Fiddler):
The response of the PageModel call can be found here (most of the image properties are null). The response of the EntityModel can be found here (image properties are filled).
Rick found out that the Entity Model response is in DXA R2 format (which is a bug?).
The Page Model JSON on the CM-side (using Preview functionality) looks as follows:
{
"Id":"128733",
"Title":"Home",
"PageTemplate":{
"Id":"128931",
"Title":"Standaard",
"FileExtension":"html",
"RevisionDate":"2019-03-19T14:05:57.12"
},
"StructureGroupId":"16859",
"UrlPath":"/index",
"Meta":{
"twitter:card":"summary",
"og:title":"Home",
"og:type":"article",
"og:locale":"en-US",
"og:image":"tcm:135-128756",
"description":"Home"
},
"Regions":[
{
"Name":"Main",
"Entities":[
{
"Id":"128938-128930"
}
],
"MvcData":{
"ViewName":"Main"
}
}
],
"MvcData":{
},
"XpmMetadata":{
"PageID":"tcm:135-128733-64",
"PageModified":"2019-03-20T18:33:20.063",
"PageTemplateID":"tcm:135-128931-128",
"PageTemplateModified":"2019-03-19T14:05:57.12"
}
}
For testing I added the component as Embedded CT on the page, the JSON on CM-side for that page looks like this (multimedia values are filled):
{
"Id": "148023",
"Title": "Home",
"PageTemplate": {
"Id": "148001",
"Title": "Standaard",
"FileExtension": "html",
"RevisionDate": "2019-03-27T07:10:51.883"
},
"StructureGroupId": "21456",
"UrlPath": "/index",
"Meta": {
"twitter:card": "summary",
"og:title": "Home",
"og:type": "article",
"og:locale": "en-US",
"og:image": "tcm:155-147994",
"description": "Home"
},
"Regions": [
{
"Name": "Main",
"Entities": [
{
"Id": "147995",
"ComponentTemplate": {
"Id": "147998",
"Title": "Nieuws",
"RevisionDate": "2019-03-27T09:30:16.433",
"OutputFormat": "HTML Fragment",
"Metadata": {
"controller": "News",
"action": "ComponentModel",
"view": "Index"
}
},
"Folder": {
"Id": "21494",
"Title": "Nieuws"
},
"Content": {
"title": "Titel",
"image": {
"$type": "EntityModelData",
"Id": "147994",
"ComponentTemplate": {
"Id": "147957",
"RevisionDate": "0001-01-01T00:00:00"
},
"Folder": {
"Id": "21494",
"Title": "Nieuws"
},
"BinaryContent": {
"Url": "/Preview/Images/logo_tcm155-147994.png",
"FileName": "logo.png",
"FileSize": 28332,
"MimeType": "image/png"
},
"SchemaId": "147781"
},
"introduction": "Introduction text",
"paragraphs": {
"$type": "ContentModelData",
"title": "Paragraaf 1",
"body": {
"$type": "ContentModelData",
"body": {
"$type": "RichTextData",
"Fragments": [
"\n <p>Bodytext</p>\n "
]
}
}
}
},
"MvcData": {
"ControllerName": "News",
"ActionName": "ComponentModel",
"ViewName": "Index"
},
"XpmMetadata": {
"ComponentID": "tcm:155-147995",
"ComponentModified": "2019-03-27T06:54:07.757",
"ComponentTemplateID": "tcm:155-147998-32",
"ComponentTemplateModified": "2019-03-27T09:30:16.433",
"IsRepositoryPublished": false
},
"SchemaId": "147976"
}
],
"MvcData": {
"ViewName": "Main"
}
}
],
"MvcData": {},
"XpmMetadata": {
"PageID": "tcm:155-148023-64",
"PageModified": "2019-03-27T08:25:19.72",
"PageTemplateID": "tcm:155-148001-128",
"PageTemplateModified": "2019-03-27T07:10:51.883"
}
}
The DXA Model Service returns for modelType=DD4T for this page this result (multimedia value is null).