I have re-written the transformation to this:
{% if(CurrentDocument.GetValue("Show_LiteratureCentre",false) && CurrentDocument.GetValue("ShowTopContent",false)){ %}
{% if(CurrentDocument.GetValue("Accordion1_TopSec",null) != null){ %}
<div class="accordion-container">
{% for(i = 1; i <= CurrentDocument.GetValue("Number_of_Accordions_TopSec",0); i++){ %}
<!--
{%
accordion = CurrentDocument.GetValue("Accordion" + i + "_TopSec",null);
accordionDoc = Documents[accordion];
accordionChildren = accordionDoc.Children.ClassNames("customProducts_Literature.Literature_Products");
%}
-->
{% if(accordion != null){ %}
<!--
{% accordionName = accordionDoc.DisplayName; %}
-->
<div>
<h3 id="header{% i %}_Lit"><a href="#" onclick="return false;">{% accordionName %}</a></h3>
<ul id="Accordion{% i %}_Lit">
<div style="position:relative;">
{% foreach (child in accordionChildren){child.ApplyTransformation("customProducts_Literature.Literature_Products.grid_literaturecentre")|(timeout)10000} #%}
</div>
{% if(DocumentCulture == "en-us"){ %}
<div class="LitOrder"><a href="#" class="button--alt-black">{% GetResourceString("custom.lblPlaceOrder", DocumentCulture) %}</a></div>
{% } %}
</ul>
</div>
{% } %}
{% } %}
</div>
{% } %}
{% } |(identity)GlobalAdministrator%}
I will probably have to go with a custom macro, or something, but I wanted to know why this exact same transformation works on an exact clone of our production environment, but it still does not work on production. We don't get a lot of users at one time... maybe 50-100.