Strange that I can't get the error to go away. I r...
# cfml-general
d
Strange that I can't get the error to go away. I refactored a remote cfc method, and I get this error:
Copy code
Invalid CFML construct found on line 58 at column 31. ColdFusion was looking at the following text:
)

The CFML compiler was processing:

A script statement beginning with try on line 55, column 21.
A script statement beginning with { on line 53, column 24.
A script statement beginning with if on line 50, column 17.
A script statement beginning with { on line 44, column 54.
A script statement beginning with if on line 44, column 13.
A script statement beginning with try on line 32, column 9.
A script statement beginning with public on line 3, column 5.
Here is a screenshot of the lines near line 58:
I've restarted the server and even removed all the logic in this method and still I get the same error message. Is the server caching the cfc?
e
restarting the server should eliminate any caching issue. for troubleshooting have you tried: 1. Revert the code to what it was before you changed anything? 2. Are there other remote CFC methods that are still working? If so putting your code into one of those and calling it?
s
restarting wouldn't eliminate a caching issue if "save class files" is checked i think, something to check
p
dump the result before line 57 and abort and analyze the sanitizedData set; maybe something in there is causing a bad context.
z
Error is probably cascading from earlier, do you have a linter?
👆🏻 1
d
I do not have a linter. Patrick, when I make code changes to that method it has no affect, the error is the same.
if I remove all the code from the cfc, the error does change to:
Neither the method create was found in component hr.unionhours.api.hours nor was there any default method with this name present in any of the implementing interface.
Oh god, I hate when this happens. On line 3 I have
variables.validator = new .....validator()
and the issue was in that validator.cfc file.
Issue is this error template is that in chrome inspector > network > response preview the full error struct doesn't expand, probably some javascript issues. I have to remember to look at the raw html returned to find the stacttrace.
e
glad you found it!
👍🏾 1
d
kinda sucks though that adobe cf doesn't tell you the correct template - you have to look for it in the stack.