I'm using SDL Web 8.5 with DD4T 2 (.NET) and Experience Manager in code. I've also got DDD4T.IsPreview
set to true in the web.config
:
Page view:
@if (XpmExtensions.XpmMarkupService.IsSiteEditEnabled())
{
@Html.Raw(XpmExtensions.XpmMarkupService.RenderXpmMarkupForPage(Model, ConfigurationManager.AppSettings["SDL.Instance"]))
}
Model:
[ContentModel("example", true)]
public class Example : IViewModel
{
[TextField(FieldName = "example_text")]
public string Text{ get; set; }
}
Component view:
<div>
@if (XpmExtensions.XpmMarkupService.IsSiteEditEnabled())
{
@Model.StartXpmEditingZone()
}
<p>@Model.XpmEditableField(m => m.Text)</p>
</div>
This renders the XPM markup as expected. I can then edit the page as expected. Updating the title, the "Update Preview" shows a yellow icon with a message: "Update Preview Your changes to this page is not up to date. Your changes to this page make an update of the page preview necessary".
What I've tried:
- Verified that Discovery service is setup and up and running
- Verified that Session Content Service is registered to Discovery
- Verified that Session Preview Service is registered to Discovery
- Verified that Session Content and Session Preview's
cd_storage_conf.xml
have been configured to point to the Session Content DB viaSessionWrapper
. - Verified that the details of the session DB are correct
- Checked the logs for session preview and session content services and found no error
- Checked the CM event logs
Would anyone have any idea of what else I could try?
Update:
If I run this locally and click the "Update Preview" I get an error:
No Publication Target or Target Type is defined for this Experience Manager-enabled Web site. To resolve this problem, Contact your SDL Web administrator.
But clicking the "Update Preview" from the DEV site deployed on another server, then it simply reloads the page as expected without the error.
Update:
I removed caching by commenting out DD4T.CacheSettings.Default
and attempted to update a component through Experience Manager and this time I get "Committing all changes" but it's stuck like this for several minutes until I quit the editing session.
Update:
Apologies for my late response:
Rick Pannekoek: GetPreviewToken request is throwing 500 error locally and returns 200 on DEV and TEST, I don't have a cd_ambient_conf.xml in the web app and localhost TTM mapping exists.
Velmurugan: I've verified that Inline Editing Disable Session Preview is selected "No".
Rajesh: I'll get started with setting the log level to Debug to get more information.
GetPreviewToken
request, which returns a Session Token. Then it should do a subsequent request to your Web App with that token in apreview-session-token
cookie.cd_ambient_conf.xml
look?localhost
base URL?