Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Assets issue
  • Hi Recently I start a new project in FuelPHP, working and setting up the assets conf I have this:
    <?php
    
    return array(
    
        'paths' => array('./'),
    
        'img_dir' => 'img',
        'js_dir' => 'js',
        'css_dir' => 'css',
    
        'folders' => array(
            'css' => array(),
            'js'  => array(),
            'img' => array(),
        ),
    
        'url' => Config::get('base_url'),
    
        'add_mtime' => true,
    
        'indent_level' => 1,
    
        'indent_with' => "\t",
    
        'auto_render' => true,
    
        'fail_silently' => false,
    );
    

    With this configuration I have css, js and img folder within public_html folder, without the Assets folder The thing is the url for every asset get rendered like this: [url=http://localhost/./css/style.css?1348516690]http://localhost/./css/style.css?1348516690[/url] Notice the ./ in the url, if I change from 'paths' => array('./') to 'paths' => array('/') or 'paths' => array('') I get an exception: Fuel\Core\FuelException [ Error ]: Could not find asset: all.css Looks like a bug.
  • Wouldn't call it a bug, I don't think anyone has anticipated that someone would like to have this folders in the DOCROOT. Fixed in 1.4/develop, if you're on 1.3 you can backport core/classes/asset/instance.php.
  • Perfect, thanks.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion