6

I have a Java (Spring MVC) app with DD4T 2 and SDL Web 8. I'm trying to get XPM to work. What's working so far:

  • XPM javascript is loaded correctly

  • XPM Comments are generated

  • Page and CPs are editable

  • Inline editing works (content gets changed in the CM database)

  • I have a wrapper in the cd_storage_conf.xml of the session-enabled content service

  • The preview-session-token cookie is set

  • Ambient is enabled on the web application (and the preview-session-token cookie is present in the taf.request.cookies claim)

  • I have added cookie configuration to the cd_storage_conf.xml of the session-enabled content service as explained by Rick Pannekoek (How to send XPM preview-session-token cookie to Session Content Service?)

  • When I click on the Update preview button, content is pushed to the Preview database

This is the Cookie stuff I put in the cd_storage_conf:

<Cookies>
   <CookieClaim DefaultValue="true" Name="CookieClaim"/>
   <Cookie Type="ADF" Name="TAFContext" />
</Cookies>

It feels like I'm very close, but I cannot connect the final dots. Any help is appreciated.

4

The problem, as it turns out, is a missing instruction in the SDL documentation. I had recently upgraded from SDL Web 8.1.0 to 8.1.1 (aka the Cumulative Update 1). I followed the instructions on how to modify my REST-driven Java web application (http://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v1/GUID-D7B6BC6E-0965-4A16-AF1C-F59DABD78775). But I never looked at the instructions for .NET applications (http://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v1/GUID-1298003D-6475-447F-A660-028227314C51). Why should I, right?

Well, I should have read that page, anyway. Because it explains that you need to add some extra claims to the list of forwarded claims in your application's cd_ambient_conf.xml. This applies to Java apps just as much as it does to .NET apps!

So in order to fix my problem, I added the following section inside the Configuration section of the file WEB-INF\classes\cd_ambient_conf.xml:

<ForwardedClaims CookieName="TAFContext">
  <Claim Uri="taf:tracking:id" />
  <Claim Uri="taf:claim:contentdelivery:webservice:user" />
  <Claim Uri="taf:claim:contentdelivery:webservice:post:allowed" />
</ForwardedClaims> 

That was it. Problem solved.

  • that's only if you have UGC enabled, as stated in the documentation, correct? – Philippe Conil Nov 30 '16 at 14:18
  • Apparently needed for XPM too - documentation team notified. – Nuno Linhares Nov 30 '16 at 14:25
  • Exactly. I'm not using UGC. This is pure XPM. – Quirijn Dec 6 '16 at 15:34
1

Even if everything is configured fine, you may get a warning that the preview is not up-to-date if your Page or any of the Components on the Page is checked out with a permanent lock.

If this is the case, you will see that if you make a change on the Page (in XPM) and then click the Update Preview button, your change remains visible (meaning that XPM Session Preview works properly). If your change disappears when you click Update Preview, something is still not configured correctly.

  • That wasn't it, but I'm sure it can be the answer in some cases! – Quirijn Nov 30 '16 at 14:08

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.