Copy link to clipboard
Copied
Since an update was made on where my site is being hosted, i can't get the URL's to work. Unfortunately my site was written over 20 years ago (not by me) , i do have experience with HTML and CSS, but cold fusion....well no. From what I have seen is that it has something to do with Scoped Variables. The URL's are showing in the browser, but it remains on the homepage. I'm using a page to control most of my nav.
So for example
<a href="./inc_executive.cfm?show=executive">Executive & Coaches</a>
simply resets to the homepage.
Any help or suggestions would be appreciated
Thanks
2 Correct answers
My guess is that you'll find it works if you change the code (perhaps in your application.cfm or cfc, that receives the request and forwards it based on that show variable in the url) so that instead of just using show, you use url.show.
There was an update to both cf2021 and 2023 last March that introduced an important change in behavior. There are also alternative workarounds you can enable at the application level or server (jvm config) level, to affect more than this one set of code. For m
...Were hosting with Hostek. I do not have that folder or access to jvm.config.
By Daffy_Ducks
No problem. There is an alternative to the jvm.config setting.
Add the following to the Application.cfc file:
<cfset this.searchImplicitScopes=true>
or, if you use Application.cfm instead,
<cfapplication searchImplicitScopes="true">
Copy link to clipboard
Copied
My guess is that you'll find it works if you change the code (perhaps in your application.cfm or cfc, that receives the request and forwards it based on that show variable in the url) so that instead of just using show, you use url.show.
There was an update to both cf2021 and 2023 last March that introduced an important change in behavior. There are also alternative workarounds you can enable at the application level or server (jvm config) level, to affect more than this one set of code. For more, see the technote for that March update, or my blog post from that day:
https://www.carehart.org/blog/2024/3/12/cf_updates_march_2024_possible_breaking_change
Let us know if that quick fix I offered works, or not.
/Charlie (troubleshooter, carehart. org)
Copy link to clipboard
Copied
Hi Charlie
Thanks for such a quick reply! Unfortuantely the quick fix did not work. mind you I only made the change in one location which was the navigation.cfm
Let me know
Thanks!
Copy link to clipboard
Copied
If the quick fix was the url.show and that "didn't fix things", well, we're still left guessing what's amiss. So before anything else, try the application level setting, or the jvm setting. See my blog post above for details.
/Charlie (troubleshooter, carehart. org)
Copy link to clipboard
Copied
Hi Charlie
... mind you I only made the change in one location which was the navigation.cfm
By Daffy_Ducks
Hi @Daffy_Ducks ,
I don't understnd what you mean by making the change in one location. The intended change applies application-wide.
One way to do it is as follows:
- Locate the configuration file /bin/jvm.config. Mine looks like this
# # VM configuration # # Where to find JVM, if {java.home}/jre exists then that JVM is used # if not then it must be the path to the JRE itself java.home=C:\\ColdFusion2021\\jre # # If no java.home is specified a VM is located by looking in these places in this # order: # # 1) ../runtime/jre # 2) registry (windows only) # 3) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre) # 4) java.exe in path # # Arguments to VM java.args=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -server --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/sun.util.cldr=ALL-UNNAMED --add-opens=java.base/sun.util.locale.provider=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED -Xms256m -Xmx1024m -XX:+UseParallelGC -Djdk.attach.allowAttachSelf=true -Dcoldfusion.home={application.home} -Djava.awt.headless=true -Duser.language=en -Dcoldfusion.rootDir={application.home} -Djava.security.policy={application.home}/lib/coldfusion.policy -Djava.security.auth.policy={application.home}/lib/neo_jaas.policy -Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib/,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/cfform/jars,{application.home}/bin/cf-osgicli.jar -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog -Djava.util.logging.config.file={application.home}/lib/logging.properties -Dtika.config=tika-config.xml -Djava.locale.providers=COMPAT,SPI -Dsun.font.layoutengine=icu -Dcom.sun.media.jai.disableMediaLib=true # Comma separated list of shared library path java.library.path={application.home}/lib,{application.home}/jintegra/bin,{application.home}/jintegra/bin/international # Comma separated list of shared library path for non-windows java.nixlibrary.path={application.home}/lib java.class.path=​
- Append -Dcoldfusion.searchimplicitscopes=true to the java.args property, then save the file. In my case, the end result is:
# # VM configuration # # Where to find JVM, if {java.home}/jre exists then that JVM is used # if not then it must be the path to the JRE itself java.home=C:\\ColdFusion2021\\jre # # If no java.home is specified a VM is located by looking in these places in this # order: # # 1) ../runtime/jre # 2) registry (windows only) # 3) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre) # 4) java.exe in path # # Arguments to VM java.args=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -server --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/sun.util.cldr=ALL-UNNAMED --add-opens=java.base/sun.util.locale.provider=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED -Xms256m -Xmx1024m -XX:+UseParallelGC -Djdk.attach.allowAttachSelf=true -Dcoldfusion.home={application.home} -Djava.awt.headless=true -Duser.language=en -Dcoldfusion.rootDir={application.home} -Djava.security.policy={application.home}/lib/coldfusion.policy -Djava.security.auth.policy={application.home}/lib/neo_jaas.policy -Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib/,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/cfform/jars,{application.home}/bin/cf-osgicli.jar -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog -Djava.util.logging.config.file={application.home}/lib/logging.properties -Dtika.config=tika-config.xml -Djava.locale.providers=COMPAT,SPI -Dsun.font.layoutengine=icu -Dcom.sun.media.jai.disableMediaLib=true -Dcoldfusion.searchimplicitscopes=true # Comma separated list of shared library path java.library.path={application.home}/lib,{application.home}/jintegra/bin,{application.home}/jintegra/bin/international # Comma separated list of shared library path for non-windows java.nixlibrary.path={application.home}/lib java.class.path=​
- Restart ColdFusion for the changes to take effect.
Copy link to clipboard
Copied
Hi BKBK
Were hosting with Hostek. I do not have that folder or access to jvm.config.
Thanks for responding
Copy link to clipboard
Copied
Were hosting with Hostek. I do not have that folder or access to jvm.config.
By Daffy_Ducks
No problem. There is an alternative to the jvm.config setting.
Add the following to the Application.cfc file:
<cfset this.searchImplicitScopes=true>
or, if you use Application.cfm instead,
<cfapplication searchImplicitScopes="true">
Copy link to clipboard
Copied
@Daffy_Ducks , regarding my last suggestion about Application.cfc and Application.cfm, if you don't know what these are, then let us know.
Copy link to clipboard
Copied
You have to change whichever files read the variables. In your first post, that looks like inc_executive.cfm.
Copy link to clipboard
Copied
Hi Dave,
So can you give me an example on the variable setup with one of my pages.
<a href="./inc_executive.cfm?show=executive">Executive & Coaches</a>
Thanks for chiming in
Doug
Copy link to clipboard
Copied
As I said at the first, if inc_executive.cfm is the file that processes that show variable being passed in the query string (thus being found by cf in the url scope), then in that file where your code currently (we presume) refers to merely the show variable (without any prefix), change that to url.show.
We can't tell you where in the template that may be. It may even be in some file that's INCLUDED on that page, or in your application.cfm or application.cfc.
Find in those whatever what refers to show (it may use #show#, or it may not). Save the file, change that to url.show, and test the request.
Or, as I originally said and bkbk elaborated (like my blog post does also), change your application to set searchimplicitscopes=true, which let's cf return to NOT requiring that code change.
Again, this is due to a security update Adobe offered last March. Your host may have only recently implemented it, thus requiring this action on your part. They should have explained this to you and all their shared hosting customers.
Let us know how it goes, or where you may continue to struggle.
Finally, if you "just want it solved", I can help via remote consulting likely in as little as 15 minutes, my minimum time increment. You won't pay for time you don't value. More at carehart.org/consulting.
/Charlie (troubleshooter, carehart. org)
Copy link to clipboard
Copied
Hi Charlie,
I emailed you!
Thanks again everyone
Copy link to clipboard
Copied
We got him sorted today, in a matter of miniutes. Just a slight tweak needed to what he was trying. All's well that ends well. 🙂
/Charlie (troubleshooter, carehart. org)
Copy link to clipboard
Copied
Thanks Charlie!
Your answer was correct all along!

