Luceeforms not defined

On my client’s server (Windows) I also do some developing. One simple form webpage uses CFForm and CFInput. When I run this page directly on the server using localhost, CFForm works as expected - but when I run the same page using the domain name, it doesn’t work - the browser console shows the message “Uncaught ReferenceError: LuceeForms is not defined”.
What could be wrong here? some misconfiguration? some rights problem?

Never used cfform or any of the related cfml forms, so this is a shot into the dark: I know the cfform functionality comes with an extension you might need to install. Did you install the extension globally in the server admin or in the web admin of localhost? In case you’ve installed them in the web admin of localhost, then it will probably be missing in the web context of the domain name. You’d need to install it there too.

I didn’t install anything on this server :slight_smile: so I don’t know but I’ll check this first thing tomorrow. Thanks!

@veloopity Isn’t this the same thing you posted about on the ColdFusion programmers facebook group. I did suggest you ask here, but I also gave you some specific things to troubleshoot and I’m unclear if you actually took my advice. If you did, you didn’t mention it here as steps you’ve already taken.

hi Brad, yes, the same issue. I followed your advice and came here :slight_smile: the network tab in the browser console that you recommended to look at doesn’t tell me much. It rather seems to be some kind of mapping problem but I don’t quite understand it so far.
I made a tiny CFForm test program so you can look for yourself (the console error pops up on loading the page):
This domain points to an “investmentfonds” subfolder underneath wwwroot. Lucee looks for its formtag files needed for CFForm in a Lucee subfolder underneath that subfolder: The console message says " Loading failed for the with source “”.
But Lucee’s WEB-INF folder lies directly underneath wwwroot, not under the “investmentfonds” subfolder. I think that the problem lies here but I’m not sure what to tweak.

reckon you have the /lucee folder locked down (which is good), so it doesn’t work

my advice? don’t ever use cfform, cfinput or any other of the old crappy ajax stuff

aside, /WEB-INF should always be blocked anyway as per the lockdown guide

don’t ever use cfform, cfinput or any other of the old crappy ajax stuff

even after relaunch, this website contains lots of legacy code which won’t go away anytime soon. So I don’t have this option to ‘don’t ever use’

I know your pain!

as per the docs, I haven’t tried it, but you can provide an alternate scriptsrc for that blocked js file?

you can provide an alternate scriptsrc for that blocked js file?

it works now. I just added an empty “lucee” folder into the root folder of the website, and copied “formtag-form.cfm” into it. Apparently, that was all


That’s fine, but seeing you ask the same question you did on facebook without appearing have looked at any of the advice I gave you days ago was odd.

Trust me, it contains very important information. If you don’t know where to look in the network tab or you can’t; make sense of the information you see, then ask us to help you. Just ignoring it because it doesn’t seem useful to you is not helping.

You need to find the HTTP request to the JS file from Lucee for CFForm.

  • what is the URL?
  • what response is being returned from the server? (which tells us if it’s even reaching Lucee)

The JS file is now loading from your workaround so there is no console error and I can’t tell what the issue was. The URL /lucee/formtag-form.cfm is not a “real” path as far as your web server is concerned, but Lucee knows how to serve it.

This is not really correct. Lucee resolves all paths starting with /lucee to a Lucee Archive (lar) that is configured in the server admin under mappings. So while it may appear to be a subfolder in the browser’s URL, Lucee is using a CF mapping to resolve the actual file. This can confuse your web server since your web server will think the file is missing which can affect rewrites and proxies, but if the web server will simply pass the URL to Lucee, then Lucee will know how to serve it.

That just means the contents of the file wasn’t valid JavaScript. You needed to look at the actual contents of that file that was coming back to get clues about where it had gotten rewritten to or what the web server had returned (like a 404, etc) You can do that by selecting the file in the network tab (filter by JS), and choosing the “preview” or “response” tab. Or, you could have right clicked on the URL and chosen “open in new tab” to open your browser directly to that file and see what is coming back.

This has nothing at all to do with the issue. The /lucee CF Mapping that serves that file is configured inside of Lucee, but the location of the web-inf has no bearing on this.

The web-inf is a red herring. Ignore it, and focus on why the URL is not being proxied as-is from the web server for Lucee to handle. As Zac said, it could even be an overzealous sys admin who blocked the entire /lucee folder instead of just the /lucee/admin folder like he should have. There are many possibilities, but again you need to find out what is being served for that file and why, which is what I suggested 2 days ago on the facebook post.