Closed robwent closed 6 years ago
I have the same problem with app.min.js on yii2 basic.
This is looks like a problem of the app template not yii2-adminlte-asset
. Does app.min.js belong to the app template you are using?
No, app.min.js required with adminlte template only. In folder with app.min.js exists adminlte.js, adminlte.min.js and demo.js. Without app.min.js in adminlte don't work right and left menu.
https://github.com/dmstr/yii2-adminlte-asset/blob/master/web/AdminLteAsset.php 18 string if you change app.min.js to adminlte.min.js, then everything will work
I see, looks like there have been changes to AdminLTE files in https://github.com/almasaeed2010/AdminLTE/tree/master/dist/js - will fix that tomorrow.
Thanks @imitronov
It looks like they have changed the data attribute for the left sidebar toggle as well.
needs to be data-toggle="push-menu"
Nested menu items don't work too.
Parent <li>
has to have class treeview
now and root <ul>
has to have class sidebar-menu tree
and attribute data-widget="tree"
The package almasaeed2010/adminlte has updated to version 2.4 and because of it files in js folder were changed. There is no app.js file.
To resolve this problem I added depended package as show bellow
"almasaeed2010/adminlte": "~2.3.0",
Fixed in 2.4.4 and 2.5.0-rc1, thank you!
I think this is still an issue because of the readme file which installs 2.1
composer require dmstr/yii2-adminlte-asset "^2.1"
Anyone following instructions to install from there are going to run into the same issue.
EDIT: According to this I think it's probably still an issue on my end https://getcomposer.org/doc/articles/versions.md#caret-version-range- When I use the command from the readme I get 2.1 every time so I've manually required 2.4.4 and updated.
There might be additional constraints on your side which require an installation of 2.1
. You can use composer why <package>
to find out more about the constraints.
I'm trying to add this to the basic Yii2 template.
Views are working fine and css is loading, but there is no js.
There is a 404 error for /assets/xxxxx/js/app.min.js
When I check the assets folder the only js file in there is adminlte.min.js and the uncompressed version (And looking again looks like there is demo.js).
Have I made a config error? I have this working fine with the advanced starter template but I can't see any different config values that might stop the js from loading.