I recently did an upgrade from CF 2016 to CF 2021 and all went well, Thanks to the inputs from the community.
One strange thing I noticed is that one of the menu options which usually renders a login/pwd page is garbled and not working, All other menu options in our site are clearly rendering the login page fine. Anything that I'm missing here?
This is what I see in the our page, other similar menu comes up with login/pwd perfectly
Any help is appreciated.
That might be caused by using the wrong character encoding. If so, the following 3 suggestions might offer a solution.
(1) Ensure that ColdFusion 2021 is running on a recent Java version (JDK 11.0.14 currently).
(2) Have a look at the CFM and CFC pages involved in that particular request. Identify all the places in the code, if any, where the charset or encoding is explicitly set. Ensure that the value is UTF-8.
Usually, a quick alternative is to put <cfprocessingdirective pageEncoding = "utf-8" > at the top of the page.
(3) In any case, ensure that, for the particular ColdFusion instance, the java.args variable in jvm.config has the flag -Dfile.encoding=UTF-8
If you made any changes, restart the ColdFusion instance.
I will check it out and revert.
Thanks for your response
Hi, for your 3 suggestions...
(1). We are running java 11.0.11 currently - not 11.0.14
(2). I added <cfprocessingdirective pageEncoding = "utf-8"> to the index.cfm page which is our login/pwd page and did not see any change, still garbled.
(3). I edited cf_root/cfusion/bin/jvm.config and added the line -Dfile.encoding=UTF-8
Restarted the CF service, No luck.
One thing I observed in the admin console for file encoding - it shows as UTF8 - without the "-" as in UTF-8. It did not get updated after jvm.config was updated as I did in (3) above. Is this configuration elsewhere that I need to change too?
Thanks again for your time,
Thanks for the update. As you've ruled out browser-caching and page-encoding as possible causes, we have to look further..
First off, the "UTF8" name in the Administrator is fine.
Java 11.0.11 is OK, unlikely to have caused the error. But I would prefer Java 11.0.14, as it is the latest so-called Critical Patch Update.
Though 11.0.11 is OK, the Java version gives us yet another possible clue. What was the Java version on your CF2016 installation? What if some Java classes from that installation were cached and are being reused in CF2021? To rule this out, delete any cached class files. You could do it, for example, by following these steps:
Thanks for the information. We just found out that a file called app_globals.cfm was corrupted and replacing that with a backup file brought back the login page and dont see any rendering issue now. Sorry for the trouble!
As you noted, will update Java asap.
Thanks for all the help.
Oh, it still came down to yet another cached file! 🙂
Thanks for sharing the solution.
Exploring this was no trouble at all. It is a learning experience.