1

Since the upgrade to 2.1 I get the following error on grunt exec:mytheme:

$ grunt exec:mytheme Running "exec:mytheme" (exec) task Running "clean:mytheme" (clean) task >> 231 paths cleaned. Done, without errors. Execution Time (2016-06-27 18:20:12 UTC) loading tasks 217ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 70% loading grunt-contrib-clean 4ms ▇ 1% clean:mytheme 88ms ▇▇▇▇▇▇▇▇▇▇ 28% Total 312ms Processed Area: frontend, Locale: de_DE, Theme: Mytheme/default, File type: less. >> [InvalidArgumentException] >> Verify entered values of the argument and options. Unable to get content for 'frontend/Mytheme/default/de_DE/Magento_Theme/css/source/module/_collapsible_navigation.less' >> dev:source-theme:deploy [--type="..."] [--locale="..."] [--area="..."] [--theme="..."] [file1] ... [fileN] >> Exited with code: 1. Warning: Task "exec:mytheme" failed. Use --force to continue. Aborted due to warnings. Execution Time (2016-06-27 18:20:11 UTC) loading tasks 281ms ▇▇▇▇▇▇▇▇ 5% exec:mytheme 5.7s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 95% Total 6s 

I did not overwrite _collapsible_navigation.less.

This is my themes.js for grunt:

'use strict'; /** * Define Themes * * area: area, one of (frontend|adminhtml|doc), * name: theme name in format Vendor/theme-name, * locale: locale, * files: [ * 'css/styles-m', * 'css/styles-l' * ], * dsl: dynamic stylesheet language (less|sass) * */ module.exports = { blank: { area: 'frontend', name: 'Magento/blank', locale: 'en_US', files: [ 'css/styles-m', 'css/styles-l', 'css/email', 'css/email-inline' ], dsl: 'less' }, luma: { area: 'frontend', name: 'Magento/luma', locale: 'en_US', files: [ 'css/styles-m', 'css/styles-l' ], dsl: 'less' }, backend: { area: 'adminhtml', name: 'Magento/backend', locale: 'en_US', files: [ 'css/styles-old', 'css/styles' ], dsl: 'less' }, mytheme: { area: 'frontend', name: 'Mytheme/default', locale: 'de_DE', files: [ 'css/styles-m', 'css/styles-l' ], dsl: 'less' } }; 

Edit

There is a @import 'module/_collapsible_navigation.less'; in app/design/frontend/Mytheme/default/Magento_Theme/web/css/source/_module.less and I did not copy the _collapsible_navigation.less - but I think it should be loaded via the fallback system from Luma (as it was before the upgrade).

If I copy the module/_collapsible_navigation.less to my theme, it works.

Is this intended?

2
  • do you get the same error when running dev:source-theme:deploy? I would also investigate the permissions for that file. Commented Jun 27, 2016 at 19:17
  • Sorry for the late response. I only work once in a week on Magento 2. php bin/magento dev:source-theme:deploy works fine without any parameters. The permissions for the file ... ehm, the file just does not exist :) Commented Jul 2, 2016 at 18:52

1 Answer 1

1

I was able to fix the problem by using

//@magento_import 'module/_collapsible_navigation.less'; 

In my overwritten Magento_Theme/module.less

(found on http://inchoo.net/magento-2/css-preprocessing-in-magento-2/)

I have no clue, why a simple @import worked in Magento 2.0 though ..

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.