3

I am using DXA 1.2 with SDL Tridion 2013 SP1.

I am seeing an issue in the Content Management side. When I publish a Page, I am seeing the RenderedContent in the JSON output for some Component Templates. When I republish the Page again, I am not seeing the RenderedContent output in the JSON. But this is happening intermittently.

I would like to understand the possibilities of this issue happening intermittently from this class DD4T.Templates.Base.Builder.ComponentPresentationBuilder:

log.Error("exception while deserializing into CP", e);
// the component presentation could not be deserialized, this probably not a Dynamic Delivery template
// just store the output as 'RenderedContent' on the CP
cp.RenderedContent = renderedContent;

I do not have the compiled solution for Content Management side at this point of time to debug further with this issue. Would like to know what is the log location of this class in CME server?

  • Whoa, 1.2 is ancient! Could easily be a bug that was sorted out in a newer version. You really gotta update your codebase to at least 1.6. – Nickoli Roussakov Oct 10 '17 at 16:00
  • Log location is the Event Viewer on the Windows server that the CM is running on. – Nickoli Roussakov Oct 10 '17 at 16:02
  • I understand that this is because of deserializing, but do you have any idea what could cause this issue intermittently? and I see DXA 1.7 as well, does 1.7 support SDL Tridion 2013 SP1? – Jey Oct 10 '17 at 16:42
  • No. 1.6 is the latest (and last) version of DXA that still supports Tridion 2013 – Nuno Linhares Oct 10 '17 at 18:07
  • @Jey, it's hard to say what is happening with the deserialization without seeing the full stacktrace. Intermittent behavior could be explained by a custom logic (that, for instance, sets an incorrect static variable) with a template, event system, custom resolver and so on. So until we see the trace, it's pointless to try and theorize. Once you got the Event Viewer log, update your question and we'll take another peek. – Nickoli Roussakov Oct 10 '17 at 20:22
1

The main question of why this is happening I can't answer yet, since there isn't enough information supplied as mentioned in the comments. Once you edit your question and update it we can focus on that part.

What I can answer is your secondary question, where to find the log statement from that code. Template Building Blocks are executed by the render engine (of the CM when previewing and from the Publisher when publishing). You mention you get this issue when Publishing, what would be interesting to know is if it also happens when previewing in the CME, and when running the Template in the Template Builder. As that would make "debugging" this a lot easier and faster for you.

The render engine by default logs to the Windows Event Log, you can configure the publisher to log to a file if you like, see https://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20full%20documentation-v1/GUID-3286A065-0EE6-410A-A08A-356C270495B5

But if you find the issue is happening during preview also, you can best debug it via the Template Builder, by simply opening the Page Template or Component Template and running it in the Template Builder (see https://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20full%20documentation-v1/GUID-FA117659-2A64-4D50-8C0A-6A213B282175). In th ebottom of the Template Builder you will get the log messages directly, and you can even change the log level to Debug in the Template Builder.

1

This is related to the concurrency issue that plagues the JSONSeralizer class in the DD4T.Serialization assembly. The problem wasn't fixed until DD4T.Model v2.2.2, and therefore is an issue with almost every version of DXA up until v2.0.

This is also not limited to just the content management side. It also affects the content delivery side and can result in extremely unstable environment (esp. under load).

It has been documented in detail in this Github issue, with additional details on the solution as follows:

  1. Updated to the latest version of Newtonsoft JSON.Net (e.g. v10+)
  2. Manually patch the web application & template building blocks projects with a replacement version of the DD4T.Serialization.dll -- manually hotfixed using the logic from DD4T v2.2.2.

This is directly related this Stack Overflow question here also as it affects many versions of DXA.

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.