1

I'm trying to extend a component in my application located on a local server (the url to access to my application is defined like that: http://my.new.application/)

Here is the structure of my application on the server (I cannot change the name of the main folder) is:

  • folder my.new.application
    • application.cfc
    • index.cfm
    • Folder
      • application.cfc
      • page.cfm

The folder folder has it's own Application.cfc file extending the master one and overloading the onRequestStart function with an empty one.

But when I try to implement that:

<cfcomponent displayname="Application" extends="my.new.application/Application">

 <cffunction name="onRequestStart">
    <!--- override the parent implementation to remove authentication for this
          part of the application --->
 </cffunction>

</cfcomponent>

I get the following error:

Could not find the ColdFusion component or interface my.new.application/Application.

On the production server the main folder is named myApplication. If I do the same:

<cfcomponent displayname="Application" extends="myApplication/Application">

It works perfectly.

Could you please help me in order to solve the problem for the local server ?

Miguel-F
  • 13,450
  • 6
  • 38
  • 63
coeurdange57
  • 715
  • 1
  • 8
  • 29
  • 1
    Possible duplicate of [Extend a CFC using a relative path](http://stackoverflow.com/questions/287187/extend-a-cfc-using-a-relative-path) – Miguel-F Aug 25 '16 at 12:11
  • I have tried these solutions, but it's not working. – coeurdange57 Aug 25 '16 at 12:22
  • Can't have slashes in the component path in `extends=`, only dots. – ale Aug 25 '16 at 12:29
  • Is the folder actually named `something.something.something` (with the periods)? That may be the issue as periods in this context normally map to folders themselves; `something\something\something`. – Miguel-F Aug 25 '16 at 12:29
  • 2
    Possible duplicate of [Extending application.cfc in a subdirectory](http://stackoverflow.com/questions/307423/extending-application-cfc-in-a-subdirectory) – ale Aug 25 '16 at 12:31
  • If I recall, Application.cfc is a special beast, and you can't simply extend it like you would other components. – ale Aug 25 '16 at 12:32
  • @coeurdange57 I guess this question had already been asked and answered in few other posts.. Check out them – David R Aug 25 '16 at 12:35
  • Hi, thanks for your replies. But if I put extends="my.new.application/Application" or extends="my.new.application.Application" I obtain the same error "Could not find the ColdFusion component or interface test.budgetting.eurostat.cec/Application. " I don't know how to solve that because the name of my main folder on my server is "my.new.application". I read the various topics but I don't find a solution. I try that and I obtain the error " The ../Application component or interface cannot extend itself." – coeurdange57 Aug 25 '16 at 13:36
  • 2
    I suggest using dots in your folder names is a bad idea. Keep it to letters, numbers, hyphens, and underscores. – ale Aug 25 '16 at 14:28
  • Read the link in "Extending Application.cfc in a subdirectory" that @AlE.posted. Your solution is in using an `ApplicationProxy.cfc` as described there. – Adrian J. Moreno Aug 25 '16 at 15:37
  • Might you have to add a mapping? – Leeish Aug 26 '16 at 16:52
  • @coeurdange57 Why you shouldn't use the same application name like as in production server?? – Sathish Chelladurai Aug 31 '16 at 12:12

0 Answers0