This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

kiitkp0324710
kiitkp0324710

use System\Classes\CombineAssets;

public function onEnd()
{
$assets = [
"assets/js/jquery.min.js",
"assets/js/jquery.easing.1.3.js",
"assets/layerslider/js/greensock.js",
"assets/layerslider/js/layerslider.transitions.js",
"assets/js/jquery.ui.totop.js",
"assets/js/custom.js",
];
$this->addJs(CombineAssets::combine($assets, $this->assetPath));
}

Error comes

We're sorry, but an unhandled error occurred. Please see the details below. The source "assets/js/jquery.min.js" is not in the root directory "/home/user/public_html"

/home/user/public_html/vendor/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php line 46 Followed this method: https://octobercms.com/forum/post/combining-a-set-of-javascript-files-within-a-component

kiitkp0324710
kiitkp0324710

Issue has been resolved

eleohner13577
eleohner13577

Hey kiitkp, can you post how you resolved the issue? It'd be helpful for anyone else down the road who might have the same issue.

Thanks!

kiitkp0324710
kiitkp0324710

Hi changed $this->assetPath to base_path('themes/themename')

Tobias Forkel
Tobias Forkel

This themes_path('theme-name') returns the same as base_path('themes/theme-name').

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.