Skip to main content
Inspiring
April 29, 2014
Question

Help with virtual directory for CFIDE CF 9.0.2

  • April 29, 2014
  • 2 replies
  • 1765 views

Thanks in advance ... if anyone could point me in the right direction for this issue I would appreciate it....


I set up the CFIDE virtual directory as per the lockdown guide for CF 9.0.2. Every website works except I have a path issue with one file... see below.... it throws a 404 error:

in administrator I have the default ScriptSrc dir set to /cf-scripts/

I have a virtual directory in the websites in IIS 7.5 named cf-scripts mapped to /CFIDE/scripts/

All the scripts come up correctly except mapiconmaker.js .... somehow the path to this file is drawing out incorrectly and causing the 404.error

<script type="text/javascript" src="/cf-scripts/ajax/messages/cfmessage.js"></script>

<script type="text/javascript" src="/cf-scripts/ajax/package/cfajax.js"></script>

<script type="text/javascript" src="/cf-scripts/ajax/yui/animation/animation-min.js"></script>

<script type="text/javascript" src="/cf-scripts/ajax/ext/adapter/yui/ext-yui-adapter.js"></script>

<script type="text/javascript" src="/cf-scripts/ajax/ext/ext-all.js"></script>

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false&key=my-key"></script>

<script type="text/javascript" src="/CFIDE/scripts/ajax/ext/map/mapiconmaker.js"></script>

<script type="text/javascript" src="/cf-scripts/ajax/ext/map/GMapPanel3.js"></script>

<script type="text/javascript" src="/cf-scripts/ajax/package/cfmap.js"></script>

<link rel="stylesheet" type="text/css" href="/cf-scripts/ajax/resources/ext/css/ext-all.css" />

<link rel="stylesheet" type="text/css" href="/cf-scripts/ajax/resources/cf/cf.css" />

the console error reads:

GET http://mobile.mydomain.com/CFIDE/scripts/ajax/ext/map/mapiconmaker.js 404 (Not Found) map-listings.cfm:14

Uncaught ReferenceError: MapIconMaker is not defined

tag usage:

<cfmap name="listingMap"

    centerlatitude="33.580563"

    centerlongitude="-117.262376"

    doubleclickzoom="true"

    overview="true"

    scrollwheelzoom="true"

    showscale="false"

    tip="Bear Creek Listings"

    zoomlevel="15"

    width="500"

    height="500">

      <cfloop query="listings"> 

       <cfmapitem name="#id#" latitude="#latitude#"  longitude="#longitude#"  tip="#address#" /> 

        </cfloop> 

</cfmap>

the map displays properly with approx 20 icon locations.

This topic has been closed for replies.

2 replies

Brainiac
April 29, 2014

I'm just guessing but the mapiconmaker.js src is the only one pointing to "/CFIDE/scripts..." whereas all the rest point to "/cf-scripts...". Try changing "/CFIDE/scripts" to "/cf-scripts"?

Carl Von Stetten
Brainiac
April 29, 2014

@Steve,

Aren't those JS resource links automatically inserted into the page by ColdFusion when you use the CF UI tags, like CFMAP?  I don't think you can control that.

-Carl V.

LarryRampAuthor
Inspiring
April 29, 2014

Almost. The localhost site I leave untouched -- that is where I do my CF Administration. For all the other sites I point the existing CFIDE virtual directory to an empty directory (or add a CFIDE virtual directory if it does not already exist). Under that virtual directory I create another virtual directory and point it to the original /CFIDE/scripts directory. You can make CFIDE a hardcoded folder but for me I point all the CFIDE's to the same empty directory.


Thanks! ... That is what I will do!

Carl Von Stetten
Brainiac
April 29, 2014

It's possible that the path to that JavaScript file was hardcoded in the ColdFusion source code, rather than calculating the path using the CF Administrator ScriptSrc value as it does for the other resources.  Could you test this with CF10 or CF11 to see if this problem is already fixed in subsequent versions?  Or maybe file a bug report with Adobe.

-Carl V.

LarryRampAuthor
Inspiring
April 29, 2014

It does look like it is hard coded somewhere... I dont know where to look for that.
It is on my webserver so I have access to the install