• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Path to CFC Not Working on new domain

Community Beginner ,
Mar 31, 2015 Mar 31, 2015

Copy link to clipboard

Copied

Hello,

I have some .cfc's that reside in the same directory as the .cfm file calling them. Everything works as expected, but now we are changing the structure of our web site and cfc paths are not working. I have spent hours trying to figure this out and still no solution.

The current (working) path to the cfc is:

wwwroot/data/historical/stateplane/select.cfc

with the domain looking like this:

http://surveyor.website.org/data/historical/stateplane/select.cfc

We are changing our the structure to, (which throws an error when looking for the cfc):

wwwroot/surveyor/data/historical/stateplane/select.cfc

with the domain changing to:

http://website.org/surveyor/data/historical/stateplane/select.cfc

The sel_stateplane.cfm page has the following code calling the cfc, which lives in the same directory:

<cfselect name="TOWNSHIP_RANGE" bind="cfc:select.getTownship()" bindonload="true" value="TOWNSHIP_RANGE" display="TOWNSHIP_RANGE" />

But with the added /surveyor folder after the root, it no longer works. I have tried to path it out like this with no luck, I get a 500 error:

<cfselect name="TOWNSHIP_RANGE" bind="cfc:surveyor.data.historical.stateplane.select.getTownship()" bindonload="true" value="TOWNSHIP_RANGE" display="TOWNSHIP_RANGE" />


Any help would be appreciated!



Views

202

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 02, 2015 Apr 02, 2015

Copy link to clipboard

Copied

LATEST

The original code should still work, provided the CFC remains in the same directory as the calling page. This one: <cfselect name="TOWNSHIP_RANGE" bind="cfc:select.getTownship()" bindonload="true" value="TOWNSHIP_RANGE" display="TOWNSHIP_RANGE" />. That is because the relative path remains unchanged.

Temporarily change the name of the application (in Application.cfc) to ensure the application restarts. ColdFusion will then have to recompile.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation