Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sass.php Windows path error in firefox #131

Open
alfredleo opened this issue Sep 23, 2013 · 1 comment
Open

Sass.php Windows path error in firefox #131

alfredleo opened this issue Sep 23, 2013 · 1 comment

Comments

@alfredleo
Copy link

Sass.php after generating style uses wrong slash in Windows. So that firefox can't read the file.

Yii::app()->clientScript->registerCssFile($url . DIRECTORY_SEPARATOR . $dstFilename);

I changed this to this code so firefox now works fine.

$cssUrl = $url . DIRECTORY_SEPARATOR . $dstFilename;
Yii::app()->clientScript->registerCssFile(str_replace('', '/', $cssUrl));

Please take a look.

@alfredleo
Copy link
Author

Main idea is that we should not use DIRECTORY_SEPARATOR in urls.
Yii::app()->clientScript->registerCssFile($url . '/' . $dstFilename);

This is also a fix if $url does not contain DIRECTORY_SEPARATOR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant