tracker issue : CF-3037289

select a category, or use search below
(searches all categories and all time range)

Bug 75031:(Watson Migration Closure)This is an ER to request support for relative component paths

| View in Tracker

Status/Resolution/Reason: To Fix//

Reporter/Name(from Bugbase): marc esher / marc esher (marcesher)

Created: 01/16/2009

Components: Language, CF Component

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Platforms All

Vote Count: 4


This is an ER to request support for relative component paths.

This would provide the ability to create objects from a location relative to the code that's calling create object, with the ability to go "UP" directories when searching. In addition, this would include support for relative paths in the "extends" attribute of the cfcomponent tag.

This functionality would provide much-needed portability for directories of components. 

Here are some examples of intended usage:


-- extends --
<cfcomponent name="someproject.dir1.MyComponent" extends="../Base.cfc">

-- createobject --

from within /someproject/dir2/OtherComponent.cfc:

<cfset collaborator = createObject("component","../dir1.MyComponent")>



----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3037289

External Customer Info:
External Company:  
External Customer Name: marc esher
External Customer Email: 70390EBF47F01CAF992015B9
External Test Config: 01/16/2009



+1 vote. I can see this being useful. I'm not too sure you've quite nailed the syntax for the path, but I cannot think of a better approach off the top of my head (which is where I apparently keep my inspiration). Cheers. -- Adam
Vote by External U.
24165 | November 10, 2011 07:12:56 PM GMT
I wholeheartedly vote for this enhancement request. With the current structure there is a real problem when testing locally then running on a remote shared server. On the local server or a standalone developer would be working on a project the site structure would look as follows: C:\ColdFusion9\wwwroot\MySiteRoot\Application Files whereas on the server where the application is uploaded the site structure looks like this: C:\ColdFusion9\MySiteRoot\Application Files In a distributed application that is often worked on by CF newbies this mapping issue really throws a monkey wrench into the works, and makes the adopting and using of CFCs quite perplexing and hard to support. So in distributed applications that are destined for shared servers is a strong force pushing us to stay with custom tags rather than moving to the advantages of CFCs. Anything I can do to help implement this enhancement in this release please let me know I'll be more than happy to help. Thank you Lawrence Cramer
Vote by External U.
24166 | November 10, 2011 07:12:58 PM GMT
It would make life easier for people who develop frameworks and applications that get distributed and can't make any assumption about where and hoe the apps will be deployed
Vote by External U.
24167 | November 10, 2011 07:12:59 PM GMT
This bug has been voted..
Vote by External U.
24168 | November 10, 2011 07:13:01 PM GMT
As per the customer's request in the comment below, we need to implement this and so moving the bug to ToFix.
Comment by Suchika S.
24164 | December 04, 2014 07:06:23 AM GMT