0

We are using Tridion 2013 and publishing content to the Tridion Broker, and using an Angular Web Application for the website. XPM is implemented and working good for field editing, and also the Finish Editing commits the changes to the backend CMS. However, the Session Preview functionality is not working.

I've read this post discussing some points about XPM and Session Preview, and as I understand it, it involves the CD layer in the Web Application.

We have inserted the XPM JavaScript and also the HTML tags for editing fields. Everything works really well. But, after XPM says 'Committing Changes' in the XPM popup the Page does not refresh with the changes. I assume it is not being re-published to the Session Preview database, and not sure why. I don't have any idea if Content Delivery is needed to facilitate the re-publish to the Session Preview database. Many of the links to answers reference ADF / CD....

The Architecture is DD4T -> Restful Service -> NodeJS -> Angular.

Any ideas if this is possible without the CD / ADF in our web application?

  • Can you elaborate on how you implemented the back-end and what you mean with “without the CD/ADF”, exactly? – Rick Pannekoek May 13 at 17:02
  • Updated, does it make more sense now? – robrtc May 13 at 17:55
1

In general, you need to have CD (incl. ADF) somewhere in your architecture to make Session Preview work.

In the architecture you describe, you do have CD (underneath DD4T), but the challenge is that it is not directly in the Web App itself, but in a (custom) REST service.

With Session Preview, the XPM front-end will send a cookie containing a Preview Session Token to the Web App. This Preview Session Token has to be sent to the CD stack (through ADF).

If you use the CD Stack directly in your Web App (and have ADF enabled and properly configured), this will happen automatically.

In your case, you will need custom code to send the Session Preview Token to the REST Service, which in turn has to send it to CD through ADF.

Note that in DXA 2.0, there is a similar architecture (with the DXA Model Service inbetween the Web App and the CD API). You can see here that the Preview Session Token is explicitly passed to the Model Service: https://github.com/sdl/dxa-web-application-dotnet/blob/master/Sdl.Web.ModelService/ModelServiceClient.cs

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.