ColdFusion Community

The online ColdFusion / CFML community website

I posted this question in a couple forums, but no answer in the past two days. Maybe it's just me that's to impatient. However this could be a nice test to see where (in which forum) can I start to bug people with my CF problems first. :))))

I am not a total rookie programmer and I've been programming in PHP for a couple of years, made some nice websites and I know all the basic concepts of programming (OOP, functions and so on)... but I recently started to discover CF I've been having some small problems on which I get stuck too much tome regarding how small the issues are.

I was able to make a recursive navigation menu all by myself a few days ago, but I am stuck on a stupid problem such as the following. :)

OK, I am confused... error says:

"The DATASOURCE parameter to the MakeBreadCrumb function is required but was not passed in. "

But I am passing it! Don't I? Is there another way I should be passing the needed variables (arguments)? Can anynone please help me solving this small problem?

Check out the code here (I cannot post code here on this forum as it seems):
The link to the code

Views: 40

Reply to This

Replies to This Discussion

You must have an argument for Datasource setup in the MakeBreadCrumb function that is required. You either have to pass datasource into the function. A quick example:
or make the argument not required.
Thank you very much, finally help from someone. :)

However I don't see any of the code you might have pasted in here. It would be nice if you could try to paste it again, because I am not really sure I understand what you mean by having a "datacource setup in the MakeBreadCrumb function". You see, I thought it is enough to pass it ftrough "cfargument" in the function definition and with an "cfinvokeargument" in the invoke definition, as I actually did in the code.

Also I already tried having the arguments in the function set on required="no", but even that didn't work - which for me as a programmer was quite logical, cause if there is no argument passed correctly, than the required field shouldn't make any difference if enabled or disabled in case that I am actually not passing any argument. I think it's a nice solution passing arguments like this, having the required field set as "yes"... only I have to figure out how to do it properly (if I would see your code example). If the argument would be passed correctly, then the required option could stay as it is: required="yes". Am I right?
Also now I see that in this forum we cannot paste any HTML or CF code, because it doesn't show it. Will have to suggest to the author of this comunity to add the [code][/code] tags possibility. Wouldn't that be great?
Opps I missed that it didn't add my example. Anyways the error that you are getting is typically related to required arguments that are not being passed in when the function is invoked. It is odd that you are getting the same error when setting the required="false" to the argument itself. Here when you invoke try this, I am not going to past the carrots so pretend they are there haha:

cfinvoke component="component" function="MakeBreadCrumb" datasource="value"
Hm... but I am doing exactly that, except that I think you meant "method" instead of "function". :)
I mean like this:

cfinvoke component="component" method="MakeBreadCrumb" datasource="value"

Have you checked my code here?

BTW, wouldn't it be nice that we could be able to post code in the same way as we can do it in some other forums, such as on the link I pasted above?
opps my bad yes I ment method not function. instead of doing this:

component="cfdocs.Recursive Navigation.cfcomponents.navigation"
cfinvokeargument name="id" value="#URL.item#"/
cfinvokeargument name="cnt" value="1"/
cfinvokeargument name="dataSource" value="#databaseSource#"/
cfinvokeargument name="table" value="#sourceTable#"/

try this
component="cfdocs.Recursive Navigation.cfcomponents.navigation"
Will do it now. Hey man, I apreciate your help. Hopefully will solve this stupid problem.
I am determined to figure this out haha. I am now trying to recreate issue on my local box. Maybe I can get it to break as well.
Also do you have a default value set for the argument that you are now set to not required? I know that Coldfusion doesn't like when an argument is not passed in and a default value is not set.
Nope, tried already to set up the default option in the function. It still doesn't find any argument from outside. I tried to set the default value to default="" and of course the error report says:

"Datasource '' could not be found."

So It is true that the arguments don't come from outside! If you will check my code, you will see that's really odd, cause it excepts the first two out of four arguments, but it doesn't "see" the last two:

cfargument name="dataSource" type="any" required="yes" default=""
cfargument name="dataTable" type="any" required="yes" default=""

So that's really odd.
Also, what version of Coldfusion are you running? It may help I suppose because now you can set this.datasource on the application page and you may be getting variable scope issues.


Latest Activity

Alex Kaniaru joined Mark Drew's group

CFEclipse Users

For people that love using the IDE that is Eclipse with the awesome plugin of CFEclipse
Apr 22
Alex Kaniaru liked Russ Johnson's group ColdBox
Apr 22
Alex Kaniaru joined Russ Johnson's group


Community group for the ColdBox framework.
Apr 22
Ashutosh Verma liked Raghuram Reddy Gottimukkula's blog post My Experience with Coldfusion Builder
Mar 2
Harmindra Sirohi updated their profile
Feb 18
Harmindra Sirohi posted a status
Feb 18
Isaac Dealey posted a discussion

PayPal Cart Integration

Hey guys,I know I haven't been on here in a little while. I'm hoping one of you will have some information on this...A client of mine asked me to integrate PayPal into their existing custom shopping cart. It's just the typical old PayFlow-style, send the browser to PayPal and then bring them back afterward. I read through all the documentation and I've got it creating the form and sending to PayPal and it all works.Now PayPal says form encryption is not required, although they also say you…See More
Jan 2
Isaac Dealey updated their profile
Jan 1


Translate this page

© 2015   Created by Nick Tong.

Badges  |  Report an Issue  |  Terms of Service