Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

The published result of a SmartTarget enabled page(below) has properly resolved the TCDL tags, but does not, however, evaluate the SmartTarget user controls at runtime. The below code is rendered to the page, minus the Page Language declaration, as is and unevaluated.

<%@ Page Language="C#" %>

<SmartTarget:promotions region="ST" var="promotion" maxItems="1"> 
    <SmartTarget:itemTemplate> 
        <SmartTarget:promotionalItems> 
            <SmartTarget:itemTemplate> 
                    <tridion:ComponentPresentation pageURI="tcm:3151-18143-64" componentURI="${item.componentUri}" templateURI="${item.templateUri}"/> 
            </SmartTarget:itemTemplate> 
        </SmartTarget:promotionalItems> 
    </SmartTarget:itemTemplate> 
    <SmartTarget:fallbackContent> 

        <br>Fallback content goes here.</br>

    </SmartTarget:fallbackContent> 
</SmartTarget:promotions> 

The web.config for the app is as follows

<configuration>
<system.web>
    <globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="en-US"/>
<pages>
    <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add tagPrefix="tridion" namespace="Tridion.ContentDelivery.Web.UI" assembly="Tridion.ContentDelivery" />
        <add tagPrefix="SmartTarget" namespace="Tridion.SmartTarget.Web.UI" assembly="Tridion.SmartTarget" />
    </controls>
</pages>

</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true">
    <add type="Tridion.ContentDelivery.AmbientData.HttpModule" name="Tridion.ContentDelivery.AmbientData.HttpModule" /> 
</modules>
  </system.webServer>
</configuration>

The relevant snippet from my smarttarget_conf below shows that the case of the ST user controls is valid and matching.

   <Tcdl>
        <Prefix>
            <Java>SmartTarget</Java>
            <DotNet>SmartTarget</DotNet>
            <Jstl>
                <Core>c</Core>
            </Jstl>
        </Prefix>

Another possibly related issue deals with the session and smart target cartridges delivered with SmartTarget. When I add those cartridges the app completely breaks with no error and renders a blank html page. This issue combined with the non-evaluation of the SmartTarget controls lead me to believe I may have a corrupt SmartTarget download.

Is there something else that anyone can think of that I might be missing here? Also let me know if there is any other information or configs I can provide to help the diagnosis.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Looks like you've asked it to render JSP tags but your site is running ASP.NET. You should change the Target Language of your Publication Target to ASP.NET and republish.

share|improve this answer
    
Took me a second to figure out how you discovered this... then saw it - attribute case. Well spotted. –  Nuno Linhares Aug 5 at 10:56
    
There's also a "var" attribute and no "runat=server" attribute (the latter being the real reason why it doesn't work), but yeah :) –  Peter Kjaer Aug 5 at 13:45
    
@PeterKjaer the target language on my publication target is ASP.NET. –  code-monkee Aug 5 at 13:53
1  
Your deployer_conf can force a language too - check the <TCDLEngine> section in it –  Nuno Linhares Aug 5 at 14:02
1  
@NunoLinhares That was it! The one thing I managed not to check. This is a POC application in a sandbox and I obviously copied a deployer from a java app instead of .NET. It also appeared that either the session or smarttarget cartridge was corrupt in the SmartTarget download. I re-downloaded and installed the new cartridges and the call to Fredhopper is now being made. –  code-monkee Aug 5 at 15:37

Here's the steps I'd take to troubleshoot your issue:

  1. configure your log file to capture your smart target events (documented here) - you can see the request made to SmartTarget plus you'll see any errors reported
  2. use the preview tool within the business manager to test that your triggers are working correctly.
  3. Write a bit of code to check that your expected values exist in the ambient data framework, i've dropped an example here

Once you've done these three, perhaps update your question with more information to help solve it, or if you solve it, please provide the answer for every one else.

share|improve this answer
    
I have already been through steps 1 and 2, but stopped there when I realized from the logging that the call to ST wasn't happening. This is when I realized the user controls were not being evaluated. I'm still trying to solve that issue. –  code-monkee Aug 5 at 14:16
    
ah well, i'll leave the info there, might be useful to someone one one day :) –  johnwinter Aug 5 at 14:38
    
Totally agree. These are the defacto steps I take as should anyone in debugging SmartTarget. When they have their deployers correctly setup, unlike I did here :) –  code-monkee Aug 5 at 15:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.