1

When creating content through the WCF core service that includes references to ecl items there is no automatic conversion to a tcm uri of the stub component like the UI does.

In the release notes of Tridion 9.6 it is mentioned that there is a new EnableExternalItems property which is enabled by default on the REST core service. This allows us to address ecl items with the ecl uri, but it does not appear to be able to create a stub item when it does not exist yet like the UI.

It seems that the only way to create a stub component without using the UI is to address the netTCP ecl service api directly. We cannot make this connection from outside of the CM server due to networking constraints. Is there any other way to create stubs for ecl items?

1 Answer 1

1

Indeed, up to Tridion Sites 9.6, the Core Service was not ECL-aware and you would have to use a combination of ECL Service and Core Service to work with ECL items or items that reference ECL items.

Since Tridion Sites 9.6, the (WCF) Core Service by default is still not ECL-aware (for backwards compatibility reasons), but if you are using the Session-aware contract/endpoints (WS-HTTP or net.tcp), you can use ISessionAwareCoreService.EnableExternalItems() to make the current Session ECL-aware. This means:

  • You can retrieve ECL items by their ECL URI

    • ECL items are modeled using distinct subclasses:

      • ExternalComponent(Data) – subclass of Component(Data)

      • ExternalKeyword(Data) – subclass of Keyword(Data)

      • ExternalContainer(Data) – subclass of Folder(Data)

  • It is possible to perform actions (save, check-out, check-in, localize, un-localize, publish, etc.) on ECL items by their ECL URI

    • These actions require a stub and this will be created if it does not exist yet
  • Links to ECL items will have the ECL URI and external title (instead of the stub TCM URI and stub title, which looks like an ECL URI)

  • Items with links to ECL items (using their ECL URI) can be saved

    • If a linked ECL item does not have a stub yet, it will be created

The Core Service REST is always ECL-aware. That is: above mentioned points are true for Core Service REST too, but you don’t have to explicitly enable this for Core Service REST.

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.