5

I'm busy testing Experience Manager in a DD4T implementation and am hitting a wall.

Our setup:

  • Tridion 2011 SP1, DD4T, Experience Manager, Workflow
  • BP: Content Parent Publication providing content for Website Publication
  • Pages are created in and published from Website Publication
  • Content is published as (DD4T) DCP's to Broker DB (and added as DCP to the Page)
  • Page Template (view) contains proper code to enable Experience Manager
  • Content views (DD4T) contain code to enable inline editing for fields

What I am trying to achieve:

  • Add a newly created Component (Presentation) to a Page via Experience Manager
  • Content should be created in the Content Parent Publication

What happens:

When I modify the Blueprint context settings for the Website Publication and have the Component BluePrint Context point to the Content Parent Publication, click apply, reload the page (or close/re-start browser), I get an error message which I do not understand:

Sequence contains no matching element

at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate) at Tridion.Web.UI.Models.SiteEdit.Services.GetBluePrintContextItemsIdsImpl(String pageId, List1 componentsIds) at Tridion.Web.UI.Models.SiteEdit.Services.GetBluePrintContextItemsIds(String pageId, List1 componentsIds) at SyncInvokeGetBluePrintContextItemsIds(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.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.ProcessMessage41(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

What could be the reason for this error? As I understand it, I can have my pages stored/created in Pub A' (child pub of pub A) and my content stored/created in Pub A. So, what am I doing wrong here?

Any feedback or further questions appreciated!

Hans

  • Hi Hans, welcome to Tridion Stack Exchange. Could you post the code from your siteedit_config.xml file please? – Rob Stevenson-Leggett Jun 11 '13 at 12:00
  • Hi Rob, thanks for the reply, but isn't the siteedit_config.xml a SiteEdit 2009 SP3 configuration file? In TXM, configuration is done through the TXM interface itself, or isn't it? – Hans Cannegieter Jun 11 '13 at 12:44
  • Yes but I suspect that the code is falling over because that section is not present in your config. You still need a siteedit_config.xml file for XPM in DD4T. – Rob Stevenson-Leggett Jun 11 '13 at 13:40
  • I think you are right Rob, if you post it as an answer Hans can mark it as correct. – Quirijn Jun 11 '13 at 14:28
  • Right, I just had a chat with Quirijn and he said that any gui configurations are indeed not picked in case DD4T is used and that it needs its own config file. Thanks @Rob! I will test this now and post the answer if successful. – Hans Cannegieter Jun 11 '13 at 14:37
2

As I stated in my comment, I think this is a small problem in DD4T where the code still expects Blueprinting information in the siteedit_config.xml when using the Experience Manager style.

Try adding the settings and this issue should be resolved.

<?xml version="1.0" encoding="utf-8"?>
<siteEdit enabled="true" style="SiteEdit2012" tridionHostUrl="http://tridion">
  <contextPublications>
    <contextPublication id="9" componentPublication="5" pagePublication="9" publishPublication="9" />
  </contextPublications>
</siteEdit>
2

Found the issue, DD4T (java implementation don't know about the .Net implementation) completes a component id with the type identifier, for example tcm:5-288 becomes tcm:5-288-16. Then if you use the blueprint options to specify a content publication and/or page publication for you publication the Experience Manager logic fails, probably due to parsing the tcm:uri trying to map the uri to the right publication, which results in the error above.

If you use the default settings, e.g. no blueprint context, it works fine with or without the type identifier.

So for short, if you want to use Experience Manager with DD4T, make sure the component id is written without the type identifier, e.g.

<!-- Start Component Presentation: { 
"ComponentID" : "tcm:5-288", 
"ComponentModified" : "2013-06-11T17:26:28", 
"ComponentTemplateID" : "tcm:5-141-32", 
"IsRepositoryPublished" : false 
} -->

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.