teamcfadvance / cfstatic

CfStatic is a framework for managing the inclusion and packaging of CSS and JavaScript in CFML applications.
https://teamcfadvance.github.io/cfstatic
MIT License
102 stars 35 forks source link

Paths are not being created correctly (Railo issue maybe?) #15

Closed gregmoser closed 13 years ago

gregmoser commented 13 years ago

I am getting started with cfstatic, and running into an issue. Here is how I have it initiated:

application.cfStatic = createObject("component", "org.cfstatic.CfStatic").init(
    staticDirectory = "C:\inetpub\wwwroot\nytrodev\default\includes\themes\nytro\static",
    staticURL = "/default/includes/themes/nytro/static/",
);

It is imporatant to note that inside of that 'static' directory, I have the following directories: css, js, min

Then in my header I have this:

#application.cfStatic.renderIncludes('css')#

However The include that gets created looks like this:

<link rel="stylesheet" href="/default/includes/themes/nytro/static/min/C:.inetpub.wwwroot.nytrodev.default.includes.themes.nytro.static.css.min.20111024025953.css" media="all" />

It is clear that the file-name that is getting created is including the entire directory path, and not just the file-name. However what actually gets created is just a file named "C" that is blank.

I am using: Windows 7 x64, IIS 7, Railo 3.3.001

I have not tested on Adobe Coldfusion yet, but I can if you like.

gregmoser commented 13 years ago

When i switch the config to minifyMode="none" I get the two files that are in my /css directory but again they come with the entire path:

<link rel="stylesheet" href="/default/includes/themes/nytro/static/cssC:/inetpub/wwwroot/nytrodev/default/includes/themes/nytro/static/css/test2.css" media="all" />
<link rel="stylesheet" href="/default/includes/themes/nytro/static/cssC:/inetpub/wwwroot/nytrodev/default/includes/themes/nytro/static/css/test.css" media="all" />
gregmoser commented 13 years ago

I have confirmed that this issue only exists on Railo and not in Adobe ColdFusion (Tested on 9.0.1). I'm more than happy to fork and fix so that it works with Railo as well, but a little bit of pointing in the right direction, like where the filename gets set would be awesome!

DominicWatson commented 13 years ago

Thanks so much for the thorough investigation and fix. Have merged into master. Just had a baby so don't have time to test, can I close this issue?

gregmoser commented 13 years ago

Yep... good to go!