Sorry not sure if there was a dedicated fusebox sl...
# cfml-general
m
Sorry not sure if there was a dedicated fusebox slack channel so posted here. Apologies in advance! I am having an issue trying to call a case statement that resides in the same cfm file from a cfmodule. This is my code - or more like legacy code I inherited. At the moment the cfmodule part of the code is resulting in a 500 error. I believe that the cfmodule is attempting to call the case statement below called "thevaldetls" but the cfmodule call is bringing about the error because I think it's not correctly syntaxed or the fusebox.rootpath is incorrect. Am I missing something? I can't work out how else to modify the code so it calls the current fuse action below. Any ideas anyone ? Thanks in advance!
<cfif fusebox.iscustomtag is "false">
<cfmodule template="#fusebox.rootpath#/index.cfm" fuseaction="api.thevaldetls" account="#attributes.account#" orderid="#attributes.order#" validID="#attributes.validID#" apicall="true"> <cfelse> <!--- pass the details back to the web front end call ---> <cfset caller.attributes.theorder=attributes.theorder> <cfset caller.attributes.validID=attributes.validID> </cfif> </cfif> </cfcase> <cfcase value="thevaldetls"> Need to get here </cfcase>
b
@Mauro caresimo Use three back tickets to create a block of code with multiple lines.
I don't think there is a fusebox channel. That framework is quite old and there's not many questions about it these days.
s
FWIW, trying to "call" a fuseaction that way via
cfmodule
sounds like a pretty serious abuse of the framework to me. I would refactor the common code into a function (or perhaps a CFC) and call it directly from both places. I don't know whether there has ever been a #fusebox channel here. I believe there is still a mailing list on Google Groups but I think it's been dormant for years. @Hanzo was the last committer to https://github.com/fusebox-framework/Fusebox-ColdFusion and that was back in 2012 but maybe he knows where there might still be any active Fusebox folks?
h
Fusebox mention! I was there...1000 years ago.
👍🏼 1
I have not heard much activity on it in many moons.
At initial glance, I'd have to agree with @seancorfield. I'm not sure in what circumstance you'd want (need?) to manipulate the core FB code in order to add new case handling, even if it were within the context of a Custom Tag. May just be a misunderstanding of Fusebox, but if saw more code / understood what you were trying to do, could perhaps give better advice.
m
Thanks ever so much everyone!