SDL Web 8.5 integrated with Media Manager via the connector - we have two mount points configured and they appear fine in the GUI for the publication I'm working with - they have ids of mm02 and mm05 respectively and share the same privileged user and Everyone group for uploads.
In our TBB code we're making a call to _session.GetContententLibraryUris(publicationId)
but this only returns one IEclUri
object, for the mm02 mount point, I never get an object for the mm05 mount point.
I've checked the _session.TridionUser object
and this is an administrator, basically the NT AUTHORITY\SYSTEM account.
Can anyone advise why I don't get both mount points returned - have I misunderstood what _session.GetContententLibraryUris(publicationId)
does?
Stripped down code snippet (I'm using Error to log stuff - I know its crude!):
public class ResolveDistributions : TraceBaseTemplate
{
private Engine _engine;
private Package _package;
public override void Transform(Engine engine, Package package)
{
_engine = engine;
_package = package;
var publicationId = _engine.PublishingContext.RenderedItem.ResolvedItem.Item.Id.PublicationId;
using (_session = SessionFactory.CreateEclSession(_engine.GetSession()))
{
_log.Error($"publicationId {publicationId}");
var libs = _session.GetContententLibraryUris(publicationId);
_log.Error($"libs {libs.Count}");
foreach (var lib in libs)
{
_log.Error($"lib {lib.MountPointId} {lib.SubType} {lib.ItemId} {lib.IsNullUri}");
}
_log.Error($"User {_session.TridionUser.IsAdministrator} {_session.TridionUser.UserName} {_session.TridionUser.Id}");
}
}
private IEclSession _session = null;
private TemplatingLogger _log = TemplatingLogger.GetLogger(typeof(ResolveDistributions));
}
UPDATE
This system has a separate Publisher and CM servers - I've just noticed that the ExternalContentLibrary.xml has some differences between the two servers.
I assume these config files should be identical?
Cheers