Skip to main content
Participating Frequently
March 7, 2025
Question

cfdiv bind 404 error with updated encryption

  • March 7, 2025
  • 1 reply
  • 1054 views

We have a shared cfc file that builds html elements, one of which calls a separate function in the file that builds a bound selection box. While testing a newer version of CF in our Dev environment we had been utilizing the following flag in our server settings:

Encryption - = -Dcoldfusion.encryption.useCFMX_COMPATAsDefault

Once we removed the flag, our bind element returns a 404 error, I assume due to the updated encryption in recent CF releases. 

Is there anything that needs to be done to make sure cfdiv bind will work with the udpated encryption?

 

 

    1 reply

    BKBK
    Community Expert
    Community Expert
    March 7, 2025

    From the information you have provided so far, it is difficult to say what's to be done.

    What is your ColdFusion version and update level? Is it possible for you to share some code with the forum?

    cf_isfunAuthor
    Participating Frequently
    March 10, 2025

    It looks like we are using enterprise version 2021.0.18.330341

    We have a directory where we have many different forms. In a separate directory we have a lot of our shared CFC files with functions to build the form elements. 

    So, in a cfm file we call a function where 'formObject' is the CFC file in the other directory:

    <cfset someInput=formObject.getSomeInput("yCallout","job","job",variables.var1,variables.var2,variables.var3,variables.var4,variables.var5)/>
    <div>#variables.someInput#</div>

    The code in this function builds 4 form elements, one of which is bound to the others. It is called via a separate function in the same CFC file with this bind code: 

    <div class="field">
    <cfdiv id="input2Div" bind="cfc:ReportFormElements.displayBoundInput({chosenVar1},{chvar2},{chosenVar3},{chVar4})" bindOnLoad="True" />
    </div>

     

    This all functioned fine until we removed this flag:

    Encryption - = -Dcoldfusion.encryption.useCFMX_COMPATAsDefault

     

    With the flag removed, our code will only function if it is in the same directory from which it's being called. So, if we have 60 different forms, we now need to put this code in 60 different folders rather than being able to reference the single CFC we are currently using.

     

    BKBK
    Community Expert
    Community Expert
    March 10, 2025

    Thanks for the extra information. So far, I cannot yet see any connection with encryption. However, one thing needs to be clarified. 

     

    The flag to be used is not Encryption - = -Dcoldfusion.encryption.useCFMX_COMPATAsDefault . It is either

    -Dcoldfusion.encryption.useCFMX_COMPATAsDefault=true

    if you wish to use CFMX_COMPAT as the default encryption, or else,

    -Dcoldfusion.encryption.useCFMX_COMPATAsDefault=false

    if you don't.

     

    That flag is to be added as one of the attributes of the java.args property in jvm.config. When the flag is not added, then ColdFusion defaults to the flag's default value, which is false.

     

    So, set the flag as described here. Then restart ColdFusion, and see whether the problem disappears.

     

    In any case, can you share the contents of your jvm.config file?