CFC Issue to Watch Out For...

I ran across an interesting CFC bug this weekend. I have a CFC method that calls a custom tag like so:

<cfmodule template="/#variables.root#/customtags/coapi/objectgetmultiple.cfm"

When I ran a sample CFM page that used this method, it ran fine, however, when I tried calling the same method as a web service, I got an error stating that foo/customtags/etc could not be found and that I needed to add a mapping for foo. Of courcse, foo already existed as mapping so it didn’t make sense.

After some digging and multiple posts, all I found was another friend who shared the same issue. It turns out that this may be a known bug in CF. When I verify it I will post here.

Now you may ask, why am I wrapping a custom tag call inside a CFC? In this case, the custom tags make up a CMS (Element) that my company develops. I’m working on a demo that utilizes Flash to speak to the CMS so I wanted to wrap up some of the core functionality inside a CFC.

While I can switch my calls to use relative paths, the entire framework depends on the use of a mapping, so this may be a problem.

As I find more I’ll edit this post.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA