8 Replies Latest reply on Oct 19, 2017 1:01 PM by darreng51843236

    cfif difference 2016 Dev vs 2016 Enterprise

    darreng51843236 Level 1

      Found a minor issue with running 2016 Enterprise (update 5) on 2016 Win Server, versus 2016 Dev (update 5) on Win 10.

       

      the cfif construct <cfif variable is "something"> or <cfif variable is not "something"> while was working in Dev 2016 fine, and earlier editions of CF, does not function on CF 2016 Enterprise.

       

      Workaround was to convert the Is and is not to EQ and NEQ.

       

      Not sure why there is a difference between the two platforms, but posting it as an awareness.

       

      Has anyone else seen this behavior?

        • 1. Re: cfif difference 2016 Dev vs 2016 Enterprise
          Carl Von Stetten Adobe Community Professional & MVP

          I can't think of a reason why there would be a difference, either.  But could you post an actual example line of code where you are seeing the difference in behavior?  I'd like to see the value you on the right of the IS or IS NOT operator, and maybe the value that is in the variable itself.

          • 2. Re: cfif difference 2016 Dev vs 2016 Enterprise
            haxtbh Level 4

            You would have to show the exact code being used and variables being passed. The Dev edition is actually the same as the Enterprise addition. The only difference is the restrictions in place for connections etc. Otherwise its exactly the same engine.

            • 3. Re: cfif difference 2016 Dev vs 2016 Enterprise
              BKBK Adobe Community Professional & MVP

              Did you get an error or an unexpected result? If an error, what does the error message say?

              • 4. Re: cfif difference 2016 Dev vs 2016 Enterprise
                darreng51843236 Level 1

                No errors, the cfif was inside a taglib member used by all pages, and when the offending cfif was hit it simply stopped processing, and a blank page was sent to the browser.

                 

                Here is the code which did not work.  I tracked it down to this specific if clause using <cfdump var="#session#"><cfabort>.  A cfdump before the is "start" would render, where as just after would see the blank page.  Changing the cfif to <cfif thisTag.executionMode eq "start"> and it worked again.  With out the <cfabort> the first cfdump would not render either.

                I found nothing like a crash or error in any of the log files, or anything which would explain what the problem might be.

                 

                <!--- Main layout tag for CDB Application --->

                <!--- AMHCS-417 Change for force the bypass of any compatibility settings for IE
                      and change doct type htmp tags for new browsers --->

                <cfheader name="X-UA-Compatible" value="IE=edge" />

                <cfsetting enablecfoutputonly=true>

                <cfparam name="attributes.bodyClass" default="default" />


                <cfif thisTag.executionMode is "start">

                <!--- Redirect if not SSL and NOT local dev environment --->
                <cfif not cgi.server_port_secure and cgi.host neq "127.0.0.1:8500" AND cgi.HTTP_HOST NEQ "localhost">
                  <!--- Redirect --->
                  <cfset newurl = cgi.host&cgi.script_name&"?"&cgi.query_string>
                  <cflocation url="https://#newurl#" />
                </cfif>

                • 5. Re: cfif difference 2016 Dev vs 2016 Enterprise
                  darreng51843236 Level 1

                  Added code and more explanations of what I am seeing

                  • 6. Re: cfif difference 2016 Dev vs 2016 Enterprise
                    BKBK Adobe Community Professional & MVP

                    darreng51843236  wrote


                    <!--- Redirect if not SSL and NOT local dev environment --->
                    <cfif not cgi.server_port_secure and cgi.host neq "127.0.0.1:8500" AND cgi.HTTP_HOST NEQ "localhost">
                      <!--- Redirect --->
                      <cfset newurl = cgi.host&cgi.script_name&"?"&cgi.query_string>
                      <cflocation url="https://#newurl#" />
                    </cfif>

                    This code depends on the environment. In all probability, therefore, it accounts for the difference in behaviour that you observe between ColdFusion 2016 Enterprise (update 5) on 2016 Win Server and ColdFusion 2016 Dev (update 5) on Win 10. If you delete or comment out all the environment variables, chances are that you wont see any IS/EQ difference.

                    • 7. Re: cfif difference 2016 Dev vs 2016 Enterprise
                      Carl Von Stetten Adobe Community Professional & MVP

                      I'm not sure if BKBK is correct or not (note that if the OP actually changes the bolded line in his code per post #4 above it seems to work).

                       

                      Might be worth seeing if Adobe can reproduce this - reach out to cfinstal@adobe.com.

                      • 8. Re: cfif difference 2016 Dev vs 2016 Enterprise
                        darreng51843236 Level 1

                        Good news on this, it appears to be a non issue.

                         

                        What was happening is the CDB application had a custom enforce SSL written, which was failing on the new server (Kept redirecting to itself)   When I had added the debug display before the CFIF which worked, and After which did not, it appears that the debug display (even with an abort) was being overridden by the redirect <cflocation> which was after the cfdump and abort.

                         

                        This made it appear as if the cfif was having the issue, when it actually was not.

                         

                        One of our other CF developers says they have seen this behavior before on CF9 with a cfdump/cfabort followed by a cflocation.

                         

                        Appreciate all the feedback people gave on this.