Issue in Dynamic Menus in Tridion 2011
Asked Answered
W

1

8

We have an application which has menus generated dynamically through the publishing of a dynamic component presentation.A menu.xml is written out by a component template based on the Structure groups and this component template is triggered through event system to be published whenever a structure group is published.

This setup was working fine until the upgrade of Tridion 2011 from Tridion 2009. But ever since the upgrade, the menus are not dynamically published and are requiring a re-publish of the menu component template every time there is a change in the structure group. We checked the event system and everything is fine there. Moreover, this republish of menu component template triggers problems in some other page menus.

On doing some debugging (we made the component template write out the pageURI it is working on at any instant), we find that the page URI that is being written out is wrong.

Below are the steps taken and conclusions arrived:

  • All erring pages have been checked; the DCP tag has correct attributes set in the JSP code

  • Additional TRACE statements were added to the Tridion tag library, this confirmed the following:

  • The XSLT was correctly retrieved from the filesystem
  • The cached menu was retrieved correctly from the cache
  • The XSLT was correctly transformed with the variables provided

  • By writing out the XSLT attributes to the HTML we see that the XSLT processor is being provided wrong parameters.

So can I safely conclude that the issue has been isolated to the following event; the XSL processor is being called with an incorrect page id. Most likely cause is due to concurrency issues in the dynamic component presentation (DCP) java code where the DCP gets swarmed and starts confusing which page is using the current object.

And if this is the case, what can be done to rectify it.

Any information would help. Thanks in Advance!

Regards,

Keirthana T S

Update on 22-Jan-2013:

On more debugging, we find this issue to be recurring on the Presentation side(our presentation server) and the event system has nothing to do with the wrong menus appearing on the page.

That is, when we view a jsp page published from Tridion, we have the correct page URI for the top menu, left menu and breadcrumbs that we have:

<tridion:ComponentPresentation pageURI="tcm:57-186286-64" componentURI="tcm:57-103196" templateURI="tcm:57-23654-32"/><!-- privat-->
<div id="nav"><div class="wrapper">
<tridion:ComponentPresentation pageURI="tcm:57-186286-64" componentURI="tcm:57-23638" templateURI="tcm:57-23656-32" />
</div></div>
<div id="page" class="clear ">
<div id="content" class="clear">
<tridion:ComponentPresentation pageURI="tcm:57-186286-64" componentURI="tcm:57-23639" templateURI="tcm:57-23656-32" />
<div id="middle" class="rightcolumn">
<tridion:ComponentPresentation pageURI="tcm:57-186286-64" componentURI="tcm:57-23636" templateURI="tcm:57-23656-32" />

However, when we view the source of the web page, we find that the page URIs(we wrote out the page URI to html page) are messed up as below: For

<div id="middle" class="rightcolumn">

which generates the breadcrumb we get a different pageURI instead of the correct one.

Wittie answered 15/1, 2013 at 7:30 Comment(5)
I'm kind-of at loss in your explanation where the issue is exactly occurring, is it at publishing time on the CMS server or at request time on the presentation server you are talking about?Dinin
@Bart: The issue is that when we change and publish a structure group, the menu component template that is supposed to be published automatically is not being published. Manual re-publishing solves the existing menu issues but sometimes triggers new errors in other pages. Also, the event system code is fine. We have checked that and the issue is not in the trigger. I feel that the XSLT processor is being fed with wrong page ids by the tridion-dynamic-6.1.0.348.jar during the dynamic component presentation publishing and hence menus are mixed up.Wittie
@Keirthana, there is a lot of custom logic you have for this and without seeing code we can only make assumptions about what is going on. Can you please share: 1) relevant event system code, 2) ct code, 3) XSLTJosie
The menu component template uses CM-side relationship, which may not match what's actually published. Any chance the errors come from non-published pages? Concurrency issues wouldn't be in a DCP itself--it's just a set of content in storage, but rather in template (C# TOM.NET) code.Firsthand
I am trying to get access for the code in live environment as Nick has asked. I will update once I get it.Wittie
A
3

Some publish-related legacy (VB) events do not work out of the box with Tridion 2011. There is a legacy event adapter available here: http://sdltridionworld.com/community/2011_extensions/LegacyEventAdapter.aspx.

Anoxia answered 15/1, 2013 at 8:11 Comment(5)
@Quirjin: Thanks, but the existing event system code of our application seems to be working, since the page URI write outs from the dynamic component presentation are happening. So any chance that the issue lies somewhere else that the event trigger, as in my explanation?Wittie
Are you saying that the rendering of this DCP is successful, but there is a failure during deployment?Anoxia
@Quirjin: Yes. We modified the DCP to write out the page URI and when we viewed the source of the page, the pageURIs are written but they are incorrect. Hence my doubt if the XSLT transformation is happening but not happening with the correct parameters.Wittie
How do you get the Page URI from a Dynamic Component Template? Is that possible?Firsthand
we have raised a SDL support ticket for this issue and even SDL cannot yet come up with an explanation to why this is happening. All our code and configuration details have been confirmed as proper by SDL. I will update the answer once this issue is resovled. Thanks to all for your help.Wittie

© 2022 - 2024 — McMap. All rights reserved.