2

When publishing a page having component with ecl item attached. it publishes successfully. adding screenshot of page and component for reference enter image description here

component: enter image description here

when checking response on graphql it doesn't add details for multimedia field when using typeContent graphql query

"components": [
            {
                "itemId": 1046,
                "title": "Basic",
                "media": null
            }
        ]

and when using untyped content query it given ecl id as title on multimedia link

"components": [
            {
                "itemId": 1046,
                "title": "Basic",
                "content": {
                    "id": null,
                    "type": null,
                    "__typename": "UntypedContent",
                    "data": {
                        "$type": "Fields",
                        "title": "Test",
                        "media": {
                            "$type": "Link",
                            "id": "tcm:XXX-XXXX",
                            "title": "ecl:0-sam-Calendar.jpg-SAMFile-file"
                        }
                    }
                }
            }
        ]

I need to retrieve metadata of ecl multimedia item, please suggest how could we achieve the same.

1 Answer 1

1

Frankly, I'm not sure about the GraphQL side of the story (where your question seems mostly about), but on CM side, there is a specific data pipeline model for ECL items:

public class ExternalContentLibraryModel : ComponentModel, IExternalComponent
{
    public string ExternalUri { get; set; }
    public IFields ExternalMetadata { get; set; }
    public ILink ExternalSchema { get; set; }
    public ISchema ExternalSchemaData { get; set; }
}

As you can see, it's an extension of the standard ComponentModel and adds ECL-specific information. Besides these additional properties, ECL also sets some of the ComponentModel properties, so it reflects the ECL item. For example: it sets ComponentModel.Binaries to a BinaryModel with Url reflecting the ECL Direct Link To Published (if available).

These data pipeline models get serialized to JSON and that's what's sent to Content Delivery.

3
  • Thanks @Rick, I am able to at least able to get ECL information on deployer package after enabling "Enable each Schema field to be made publishable when authors publish an item based on this Schema" on Stub Schema. but I am still unable to get those details on GraphQL response. Commented Sep 3 at 12:26
  • With the provided example GraphQL, it seems you are reading a regular Component which links to an ECL (Stub) Component (through a Component Link field called "media"). Did you try to read the ECL (Stub) Component itself (tcm:XXX-XXXX) through GraphQL too? Commented Sep 3 at 15:35
  • yes it returns only { "node": { "itemId": 1045, "title": "ecl:0-sam-Calendar.jpg-SAMFile-file" } } without any more information, I checked on broker database as well it doesn't store related content for ecl component Commented Sep 4 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.