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

Question regarding compiled javascript source path (double slash) #9

Closed
matse opened this issue Aug 7, 2014 · 1 comment
Closed
Assignees
Labels

Comments

@matse
Copy link

matse commented Aug 7, 2014

Nothing serious, but I get a double slash after the base url, like http://www.example.com//assets/script.min.js.

Am I doing something wrong? Configuration is like explained in the example:

$config['assets_dir'] = 'assets';
$config['css_dir'] = 'assets/css';
$config['js_dir'] = 'assets/js';

I guess the second slash is from Minify#deploy_js:384

return "<script type=\"text/javascript\" src=\"" . base_url() . '/' . $this->js_file . "\"></script>";

CI config.php states the base URL comes with a trailing slash, so the one separator after base_url() is the second one.

/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
|   http://example.com/
|
| If this is not set then CodeIgniter will guess the protocol, domain and
| path to your installation.
|
*/
@rogervila
Copy link

Hello! Just remove the slash between base_url() and $this->js_file on the Minify.php, line 384

before:
base_url() . '/' . $this->js_file

after:
base_url() . $this->js_file

@slav123 slav123 self-assigned this Aug 13, 2014
@slav123 slav123 added the bug label Aug 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants