5

I followed the following tutorial : http://www.sdltridionworld.com/community/2011_extensions/itemselector.aspx to create a tree based on the one on administration panel with the structure groups, sites, pages, components, etc.

I can create the root with the websites but when I try to access to Building Blocks, Sites or Categories and Keywords I find an error, here is the code related:

case ItemType.StructureGroup:
    using (var client = new TridionClient())
    {
        var items = client.Client.GetList(uri.ToString(),new OrganizationalItemItemsFilterData(){Recursive = false});    
        toReturn.AddRange(ConvertToListTreeNode(items));
    }
    break; 

and the exception:

System.ServiceModel.FaultException'1 {"Unexpected list type: Tridion.ContentManager.Data.ContentManagement.OrganizationalItemItemsFilterData."}

Server stack trace:

at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Tridion.ContentManager.CoreService.Client.ICoreService.GetList(String id, SubjectRelatedListFilterData filter)
   at AdminPanel.TreeHelper.PopulateNode(String uri) in \\*\Visual Studio 2010\Projects\AdminPanel\AdminPanel\TreeHelper.cs:line 241
   at AdminPanel.Controllers.HomeController.Node(String url) in \\*\Visual Studio 2010\Projects\AdminPanel\AdminPanel\Controllers\HomeController.cs:line 21
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()

Any suggestion is welcome,

Thanks in advance.

  • what version of SDL Tridion are you using? – Bart Koopman Jul 16 '13 at 7:50
  • SDL Tridion 2011 – Giu Do Jul 16 '13 at 7:57
  • I think it might help if you add a little bit more of the code to your question, also, when you debug it, what is the actual value of the URI you are calling GetList with? – Bart Koopman Jul 16 '13 at 8:54
2

Okay, I finally resolved it, with the tutorial, we cannot use GetList() methods (with your client), it is mandatory to parse it in xml and then read it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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