I'm trying to bind a spry data set to a CFC function. My code is working fine
in my test environment but not in production. In production, when I try loading
the script that does the binding, I'm getting an error saying
Error loading spry dataset FooYou from URL: /MyComponent.cfc with params
_cf_nodebug=tru&_cf_no_cache=true&cfclientID=bunch-of-chars&method=myMethod&argu
mentcollection=%7B%7D...
The code in both the production and test environement are identical; but the
directory structures are a bit different. In the test environment, the
directory structure is as follows:
c:/wwwroot/SomeDir/clientLists/
The myComponent.cfc and the script that I'm invoking are in clientLists/.
http://someIP/ points to wwwroot/SomeDir/
In production, it's more like this:
c:/wwwroot/AnotherDir/SomeDir/clientLists/
and http://www.DomainName.com/ points to wwwroot/AnotherDir/SomeDir/
and again, the CFC and script that I'm invoking are in clientLists/
My call looks like this:
<cfsprydataset
name="dsMyDataList"
type="xml"
bind="CFC:MyComponent.geData(paramID={frmStuff:paramID})"
xpath="datalist/dataitem"
options="{method: 'POST' }"
onBindError="errorHandler"
I don't get the error until I try to use the dataset with
spry:region="dsMyDataList"
Seems like it must be the directory structure...but I've yet to come up with
something that works. Any clues would be apprecitaed...
lchalnick - 06 May 2008 04:56 GMT
This is definitely some kind of pathing issue. I tried moving the directory
that contains the CFC and script that employs cfsprydataset to a website on the
production server in which the website is just off the wwwroot directory in
which CFIDE is located. This is how it is in the test server and again, this
works.
I.e., if I move my /clientLists dir and everything it contains underneath this
dir, everything works:
/wwwroot/AnotherWebDir/
The web server is configured to point to /AnotherWebDir/ as the root of
another website; i.e., www.AnotherWeb.com is located in /wwwroot/AnotherWebDir/
So, when the website is located immediately below /wwwroot, if I then place my
/clientLists directory (and everything it contains) in this directory,
everything works. Unfortunately, I cannot do this, so I'm stuck trying to
figure out how to specify the paths so that this code works when
/wwwroot/AnotherDir/SomeDir/
is the root for my website.