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

Help with virtual directory for CFIDE CF 9.0.2

Explorer ,
Apr 29, 2014 Apr 29, 2014

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.

1.5K
Translate
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
Guide ,
Apr 29, 2014 Apr 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.

Translate
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
Explorer ,
Apr 29, 2014 Apr 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

Translate
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
Advocate ,
Apr 29, 2014 Apr 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"?

Translate
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
Guide ,
Apr 29, 2014 Apr 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.

Translate
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
Advocate ,
Apr 29, 2014 Apr 29, 2014

I never used CFMap so I was not aware that this was CF generated includes. If so, sounds like a bug in CF. I've never done the "cf-scripts" route. I keep the CFIDE path intact and instead repoint it to a different location. I point CFIDE to an empty directory and then create a scripts virtual directory under it and point it back to the original /CFIDE/scripts location.

Translate
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
Guide ,
Apr 29, 2014 Apr 29, 2014

@Larry, I do the same thing @Steve does.  That would solve your problem.

-Carl V.

Translate
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
Explorer ,
Apr 29, 2014 Apr 29, 2014

It sounds like I will need to do that... since I found another instance in one of the generated .js files hardcoded to a .gif file

Thanks!... trying to lock down leads to more issues when changing the path / folder names

Translate
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
Explorer ,
Apr 29, 2014 Apr 29, 2014

Let me confirm this path.... in each website you create a hardcoded CFIDE folder and virtual under that one to scripts... and in CF administrator you leave the path /CFIDE/Scripts/

Correct?

Translate
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
Advocate ,
Apr 29, 2014 Apr 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.

Translate
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
Explorer ,
Apr 29, 2014 Apr 29, 2014

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

Translate
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
Explorer ,
Apr 29, 2014 Apr 29, 2014
LATEST

That worked great (as it should have) as soon as I removed the Deny for the CFIDE/scripts from IIS Request filtering.

Thanks for the assistance!!

Translate
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
Explorer ,
Apr 29, 2014 Apr 29, 2014

These are all generated by CF ... I am using <cfmap and the files above are the ones generated.

Translate
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