Forum Discussion

iftomkins's avatar
11 years ago

Version works on stage, but is broken on production

We just made a version live on production, only to discover that it was displaying incorrectly (all content smushed into one column on the right), so we quickly reverted.

 

We're now troubleshooting what it could be. Does anyone know why display would be different on stage and production? What are a list of things to double check if things are displaying differently on stage vs. production?

 

Thanks!

Alan

  • Thanks to you both. I checked http/https and resources loading. Turned out the issue was with a custom component where a variable didn't exist.

     

    <#if role.name?? && (role.name == "Administrator" || role.name == "Moderator" || role.name == "Moderator2" || role.name == "Analytics")>
           <#assign is_user_admin = true />
    </#if>

     

    <#if is_user_admin = true />

     <#-- do things -->

    </if>

     

    It was fixed when I added this line above the first <#if> statement: 

     

     <#assign is_user_admin = false />

     

     

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)
    By your description, it could be some asset or CSS is not loading properly. Have you checked the browser dev console (in Chrome or using Firebug in FF) that all the linked resources are loading correctly as in stage? That's the first thing I would look at.
    • HaidongG's avatar
      HaidongG
      Lithium Alumni (Retired)

      beside what PaoloT mentioned, you may also want to check whether you are accessing the site via http or https.

       

      for example, stage server allows accessing from both http and https, but production allows https (forwarding all http to https) only. When the page displayed correctly with http (in stage), it may not go well with https (in production).

      • iftomkins's avatar
        iftomkins
        Maven

        Thanks to you both. I checked http/https and resources loading. Turned out the issue was with a custom component where a variable didn't exist.

         

        <#if role.name?? && (role.name == "Administrator" || role.name == "Moderator" || role.name == "Moderator2" || role.name == "Analytics")>
               <#assign is_user_admin = true />
        </#if>

         

        <#if is_user_admin = true />

         <#-- do things -->

        </if>

         

        It was fixed when I added this line above the first <#if> statement: 

         

         <#assign is_user_admin = false />