-
Notifications
You must be signed in to change notification settings - Fork 602
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
Failed to assign arg @list: line: 121 during php artisan basset:build #223
Comments
What version of php are you on? What type of OS? Also seems to be a basset issue, not a starter site issue. |
Thanks for quick reply. |
I'm getting this same exact error so it's definitely a bug, I'll check on basset for a fix in the meantime the documentation here could include a workaround. |
I do believe there's an issue here, not sure at the moment what it is. I don't have time to dig for it at the moment, but if you figure out a proper workaround let me know and I'll include it in the docs. |
working on it, it's pretty confusing but clearly a basset issue - or the use of basset in this app |
same issue with me too..on windows with wamp 2.4 !! |
is there a way to bypass this functionality? It's completely halted any development using this starter site. Can't even get views to load |
OK i got it: http://raffworks.com/laravel-4-assets-basset-less-part-1/ and the line is : 'Less' => array('LessphpFilter', function($filter). You need to set Basset to use lessphp. But now i have another error: Call to undefined method Illuminate\Support\Facades\Auth::check(), but i think i can manage with that. |
Well, actually, not getting error anymore, but : [application] Stylesheets build was not required for collection. Style and JS not compiling. Any idea anyone? |
For me the lessphp filter was already in place. What I did different was publish the settings doing: php artisan config:publish jasonlewis/basset Now I can run build, however using: php artisan basset:build I get the following: [application] Stylesheets build was not required for collection. So my project has no style or js. |
the css & js will not load because the basset config file changed from the starter that came with.........will dig further & see what we can get |
Yes, also there. Change in config 'collection' => 'application' to 'public' and/or 'admin' and then basset:build public / basset:build admin. Then you'll get it to compile. But jquery is missing, so js is not working, but managed to get styles. Also build path to assets/compiled. |
i don't follow, still no assets |
is this all necessary? I'd be fine with hardcoding the assets and compiling less files myself. Where can I grab them and how could I gut this feature? |
I believe less files are a part of twbs (under vendors). Take a look at /public/css/less/master.less. I guess you could manually compile from that. |
hmm ya would be nice to get this working. I tried changing the collection name in config to public and do the build and I get the same result: [public] Stylesheets build was not required for collection. |
Here is my config, it should work: array( 'public' => function($collection) { // Switch to the stylesheets directory and require the "less" and "sass" directories. // These directories both have a filter applied to them so that the built // collection will contain valid CSS. $directory = $collection->directory('assets/css', function($collection) { $collection->requireDirectory('less')->apply('Less'); $collection->requireDirectory('sass')->apply('Sass'); $collection->requireDirectory(); }); $directory->apply('CssMin'); $directory->apply('UriRewriteFilter'); // Switch to the javascripts directory and require the "coffeescript" directory. As // with the above directories we'll apply the CoffeeScript filter to the directory // so the built collection contains valid JS. $directory = $collection->directory('assets/js', function($collection) { $collection->requireDirectory('coffeescripts')->apply('CoffeeScript'); $collection->requireDirectory(); }); $directory->apply('JsMin'); }, 'admin' => function($collection) { // Switch to the stylesheets directory and require the "less" and "sass" directories. // These directories both have a filter applied to them so that the built // collection will contain valid CSS. $directory = $collection->directory('assets/css', function($collection) { $collection->requireDirectory('less')->apply('Less'); $collection->requireDirectory('sass')->apply('Sass'); $collection->requireDirectory(); }); $directory->apply('CssMin'); $directory->apply('UriRewriteFilter'); // Switch to the javascripts directory and require the "coffeescript" directory. As // with the above directories we'll apply the CoffeeScript filter to the directory // so the built collection contains valid JS. $directory = $collection->directory('assets/js', function($collection) { $collection->requireDirectory('coffeescripts')->apply('CoffeeScript'); $collection->requireDirectory(); }); $directory->apply('JsMin'); } ), /* |-------------------------------------------------------------------------- | Production Environment |-------------------------------------------------------------------------- | | Basset needs to know what your production environment is so that it can | respond with the correct assets. When in production Basset will attempt | to return any built collections. If a collection has not been built | Basset will dynamically route to each asset in the collection and apply | the filters. | | The last method can be very taxing so it's highly recommended that | collections are built when deploying to a production environment. | | You can supply an array of production environment names if you need to. | */ 'production' => array('production', 'prod'), /* |-------------------------------------------------------------------------- | Build Path |-------------------------------------------------------------------------- | | When assets are built with Artisan they will be stored within a directory | relative to the public directory. | | If the directory does not exist Basset will attempt to create it. | */ 'build_path' => 'assets/compiled', /* |-------------------------------------------------------------------------- | Debug |-------------------------------------------------------------------------- | | Enable debugging to have potential errors or problems encountered | during operation logged to a rotating file setup. | */ 'debug' => false, /* |-------------------------------------------------------------------------- | Node Paths |-------------------------------------------------------------------------- | | Many filters use Node to build assets. We recommend you install your | Node modules locally at the root of your application, however you can | specify additional paths to your modules. | */ 'node_paths' => array( base_path().'/node_modules' ), /* |-------------------------------------------------------------------------- | Gzip Built Collections |-------------------------------------------------------------------------- | | To get the most speed and compression out of Basset you can enable Gzip | for every collection that is built via the command line. This is applied | to both collection builds and development builds. | | You can use the --gzip switch for on-the-fly Gzipping of collections. | */ 'gzip' => false, /* |-------------------------------------------------------------------------- | Asset and Filter Aliases |-------------------------------------------------------------------------- | | You can define aliases for commonly used assets or filters. | An example of an asset alias: | | 'layout' => 'stylesheets/layout/master.css' | | Filter aliases are slightly different. You can define a simple alias | similar to an asset alias. | | 'YuiCss' => 'Yui\CssCompressorFilter' | | However if you want to pass in options to an aliased filter then define | the alias as a nested array. The key should be the filter and the value | should be a callback closure where you can set parameters for a filters | constructor, etc. | | 'YuiCss' => array('Yui\CssCompressorFilter', function($filter) | { | $filter->setArguments('path/to/jar'); | }) | | */ 'aliases' => array( 'assets' => array(), 'filters' => array( /* |-------------------------------------------------------------------------- | Less Filter Alias |-------------------------------------------------------------------------- | | Filter is applied only when asset has a ".less" extension and it will | attempt to find missing constructor arguments. | */ 'Less' => array('LessFilter', function($filter) { $filter->whenAssetIs('.*\.less')->findMissingConstructorArgs(); }), /* |-------------------------------------------------------------------------- | Sass Filter Alias |-------------------------------------------------------------------------- | | Filter is applied only when asset has a ".sass" or ".scss" extension and | it will attempt to find missing constructor arguments. | */ 'Sass' => array('Sass\ScssFilter', function($filter) { $filter->whenAssetIs('.*\.(sass|scss)')->findMissingConstructorArgs(); }), /* |-------------------------------------------------------------------------- | CoffeeScript Filter Alias |-------------------------------------------------------------------------- | | Filter is applied only when asset has a ".coffee" extension and it will | attempt to find missing constructor arguments. | */ 'CoffeeScript' => array('CoffeeScriptFilter', function($filter) { $filter->whenAssetIs('.*\.coffee')->findMissingConstructorArgs(); }), /* |-------------------------------------------------------------------------- | CssMin Filter Alias |-------------------------------------------------------------------------- | | Filter is applied only when within the production environment and when | the "CssMin" class exists. | */ 'CssMin' => array('CssMinFilter', function($filter) { $filter->whenAssetIsStylesheet()->whenProductionBuild()->whenClassExists('CssMin'); }), /* |-------------------------------------------------------------------------- | JsMin Filter Alias |-------------------------------------------------------------------------- | | Filter is applied only when within the production environment and when | the "JsMin" class exists. | */ 'JsMin' => array('JSMinFilter', function($filter) { $filter->whenAssetIsJavascript()->whenProductionBuild()->whenClassExists('JSMin'); }), /* |-------------------------------------------------------------------------- | UriRewrite Filter Alias |-------------------------------------------------------------------------- | | Filter gets a default argument of the path to the public directory. | */ 'UriRewriteFilter' => array('UriRewriteFilter', function($filter) { $filter->setArguments(public_path())->whenAssetIsStylesheet(); }) ) ) ``` ); |
bingo, must be something else that was different in mine somehow. Thanks! |
But it still acts weird. Be sure to compile both.(admin and public). I still have not managed to get the navigation menu working. I think it's too late today, maybe tomorrow. |
ya I'm where you are. Added Jquery to the head and it got me a bunch more errors. Loosing patience with this as a shortcut to starting from scratch. :-/ |
Uncaught TypeError: Cannot read property 'defaults' of undefined datatables-bootstrap-a5bbeb6d8cb198bb3f428df5496096ef.js:2 Uncaught TypeError: Cannot read property 'oApi' of undefined datatables.fnReloadAjax-a5bbeb6d8cb198bb3f428df5496096ef.js:14 Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://localhost:8000/assets/img/glyphicons-halflings.png |
I temporarily replaced grid.less with latest grid.less downloaded from Bootstrap site, and got successful loading. |
no luck with this file https://raw.github.com/twbs/bootstrap/master/less/grid.less |
Decided to move forward without this starter. It's a good project though On Tuesday, October 15, 2013, DarkHero8 wrote:
Kevin Compton |
Sorry to hear that. Best of luck! |
I am having the same issue with the latest code also. When I modify the basset/config.php file per iiker's suggestion "Less' => array('LessphpFilter', function($filter). You need to set Basset to use lessphp." it does fix the basset generation issue but now it looks like there is no CSS formatting going on. Also for some reason it seems to be pulling in the tooltip.js file in the wrong order as I receive the error Uncaught Error: Popover requires tooltip.js on most pages. Looking at the page source the generated code looks like this
As you can see the tooltip.js file is included after the popover.js file. I believe that tooltip.js needs to be include before the popover.js. Looks like this is getting generated in alphabetical order which just seems wrong as you sometimes need some control on the order that these assets get generated in. The Gruntfile.js file in twbs/bootstrap/ seems to have the javascript files in the correct order as per here
I have an earlier version of the starter site installed and it seems to work fine except for the tooltip.js issue. Looks like I downloaded that some time around 9/6/2013. I will do some comparison on the various config files to see if I can see if that is the issue. And I will also attempt to find out the various version of the software that I have installed in each system. Let me know if anyone needs more information. |
I use grid.less Bootstrap Team put at http://getbootstrap.com/ (https://github.com/twbs/bootstrap/archive/v3.0.0.zip). The version included in the starter has mixins that caused this issue. |
Same issue for me |
Same here: Failed to assign arg @list: line: 121 I'm on windows 7, PHP Version 5.4.7 . It's unusable because of this. Also the old issue still seems to be unresolved or at least it appear so. I am thankful for this starter but what use it is if it can't be used. I already had to use different starter for 3 projects and I would really like to use this one.I was hoping that months latter it would work nicely but no luck :( It seems that basset is causing a lot of problems - is it possible to ditch it and replace it with something better? It looks like in both of cases it is a basset issue! Thanks. |
I can confirm that the comment by @nzram worked. I pulled the zip from https://github.com/twbs/bootstrap/archive/v3.0.0.zip and replaced all the less files with the ones from the zip file, and everything worked. |
@luckysmack I just tried it and you are right - this fixes this issue. Thanks @nzram . Now #133 still remains, I'll see if any of offered solutions will work. Edit, both issues are solved for me now: Time out on windows (why is http: not used? Why does url start with just // ?): Failed to assign arg @list: line: 121 during php artisan basset:build |
It works!! |
I can confirm, even though I actually replaced entire twbs bootstrap with the 'official' one - all works just fine. Cheers, |
Yep, thanks @nzram - that worked a charm! |
So is the solution to just put twitter bootstrap in the project instead of using the composer version? |
IMHO, yup :)
|
Thanks @nzram - that fixes the basset compiling issue.. but still don't have any css formatting... not sure what that is about... |
Ok Figured out the CSS issue.. forgot to change back the less filter alias to LessphpFilter.. everything is now back to normal THANKS!!!!! |
Got this same issue today. TWBS was updated to 3.0.1 four days ago. A solution that worked for me was to change the version in composer to "3.0.0" instead of "3.0.*" "require": {
"laravel/framework": "4.0.*",
"twbs/bootstrap": "3.0.0", |
Can confirm the workaround provided by @nightowl77 Any progress on a fix? |
Thanks for the fix! Same issue. andrew13 |
Got that error, did everything according to instructions.
The text was updated successfully, but these errors were encountered: