2

I build the ECL connector to get content from Rest Services as SDL Tridion components. As usual each ECS component created has two metadata section (external with rest service data and custom as defined in SDL Trdion Schema).

I am able to save the values in custom metadata if not visiting/clicking to external metadata tab. It is bit strange but if I am clicking to external metadata tab and saving after then it is not allowing me to save ECL component and throwing following error.

One or more errors occurred. Specified method is not supported. at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Tridion.ExternalContentLibrary.Service.EclService2012.SaveItem(String itemUri, String deltaXml, Boolean doneEditing) at SyncInvokeSaveItem(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at ‏ Tridion.ExternalContentLibrary.Service.TransactionSupportInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

Just to add more detail we also have event system code for ecl components but error remain same even after disabling event system as well.

Please suggest what could cause that issue. Any help or clue would be much appreciated.

Added dummy code

public IContentLibraryItem Save(bool readback) 
    { 
        return readback ? this : null; 
    } 

    public bool CanGetViewItemUrl 
    { 
        get { return false; } 
    } 

    public bool CanUpdateMetadataXml 
    { 
        get { return false; } 
    }
3
  • is CanUpdateTitle also returning false? Commented Feb 18, 2015 at 11:54
  • Thanks Bart for looking this.. Yes, CanUpdateTitle also returning false. Commented Feb 18, 2015 at 12:03
  • with CanUpdateMetadataXml and CanUpdateTitle both returning false, the Save method should not be called in my opinion, so I would need more details to understand what is going on. Have you checked the ECL log for further details, or tried debugging your provider? Commented Feb 18, 2015 at 13:34

2 Answers 2

1

Looking at what you describe is going wrong, and considering that CanUpdateMetadataXml and CanUpdateTitle both returning false, the Save method should not be called.

The next step would actually be to look at the ECL log file for more detail on the error (you will find its location in the ..\Tridion\config\ExternalContentLibrary.xml file). Optionally you could debug the provider code to see where it is actually going wrong.

when we looked at your logfile we saw that the error was an NotSupportedException() being thrown, this came from the following code (the setter):

public string MetadataXml
{
    get { return My.MetadataXml; }
    set { throw new NotSupportedException(); }
}

This indicates a defect, since as mentioned above, the Save method should not be called, and neither should the setter in your situation.

I checked with Customer Support and it appears this is a known issue and there is a hotfix available for it on 2013 SP1, the hotfix number is 87237. To request this, please log a ticket with Customer Support and mention the problem you have (since this hotfix is not yet released on SDL Tridion World).

Optionally rather than the setter throwing the NotSupportedException(), you could also have the setter return null, that way the "save" just doesn't do anything

0
2

It looks like it's trying to save the external metadata through the REST service and the REST service hasn't implemented that method.

The GetResultCore method is part of the .Net framework and this is where the exception happens (see the source). As it is very unlikely that this method itself is causing the problem the only logical conclusion is that whatever the Task has actually done resulted in an exception and ThrowIfExceptional is forwarding the exception to the task consumer.

If you do not intend to allow editors to update your external metadata I would suggest using a dummy implementation for the Save operation in your connector code.

3
  • Thanks.. No I definitely not want user to update external metadata. I already have save code ..added in the question. Does it has to be null only in every case? Commented Feb 18, 2015 at 10:10
  • Don't think it's mandatory to return null always; I think it's a mismatch between the GUI trying to invoke Save() and the CanUpdateMetadataXml returning false; can you verify you have the same problem if CanUpdateMetadataXml returns true? Commented Feb 18, 2015 at 10:15
  • Changing CanUpdateMetadataXml is not helping. Commented Feb 18, 2015 at 10:55

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.