1

I have been having an issue with my magento 2.1.8 webstore in which the styles.less for the admin pages is not being generated.

I am receiving this error when i try to do a static-content:deploy

adminhtml/Magento/backend/en_GB/css/styles.less Unable to get content for 'adminhtml/Magento/backend/en_GB/Magento_Checkout/css/ source/module/_checkout.less'

The Magento_Checkout module has been overwritten in my current theme, and i have placed the _checkout.less from the original module in the overwritten module in css/source/module/ but the error is still occurring.

What would be the correct location to place this file?

EDIT:

it seems I am missing a folder:

adminhtml/Magento/backend/en_GB/Magento_Checkout

This folder is not appearing at all in the static/adminhtml/magento/backend/en_GB directory when i run static-content:deploy

How do i make this folder appear?

Thanks

EDIT 2:

after commenting out the line:

@import '../Magento_Checkout/css/source/_module.less';

in styles.less I have found that the issue is not with the magento checkout, it is with the imports for all the modules:

// @import '../Magento_Checkout/css/source/_module.less';
// @import '../Ess_M2ePro/css/source/_module.less';
// @import '../Magento_AdminNotification/css/source/_module.less';
// @import '../Magento_AdvancedCheckout/css/source/_module.less';
@import '../Magento_Backend/css/source/_module.less';
@import '../Magento_Banner/css/source/_module.less';
@import '../Magento_Braintree/css/source/_module.less';
@import '../Magento_Catalog/css/source/_module.less';
@import '../Magento_CatalogPermissions/css/source/_module.less';
@import '../Magento_Config/css/source/_module.less';
@import '../Magento_ConfigurableProduct/css/source/_module.less';
@import '../Magento_CurrencySymbol/css/source/_module.less';
@import '../Magento_Customer/css/source/_module.less';
@import '../Magento_CustomerBalance/css/source/_module.less';
@import '../Magento_Downloadable/css/source/_module.less';
@import '../Magento_GiftCard/css/source/_module.less';
@import '../Magento_GiftRegistry/css/source/_module.less';
@import '../Magento_GiftWrapping/css/source/_module.less';
@import '../Magento_Marketplace/css/source/_module.less';
@import '../Magento_ProductVideo/css/source/_module.less';
@import '../Magento_Review/css/source/_module.less';
@import '../Magento_Reward/css/source/_module.less';
@import '../Magento_Rma/css/source/_module.less';
@import '../Magento_Sales/css/source/_module.less';
@import '../Magento_Shipping/css/source/_module.less';
@import '../Magento_Staging/css/source/_module.less';
@import '../Magento_Tax/css/source/_module.less';
@import '../Magento_Translation/css/source/_module.less';
@import '../Magento_Ui/css/source/_module.less';
@import '../Magento_Vault/css/source/_module.less';
@import '../Magento_VersionsCms/css/source/_module.less';
@import '../Magento_VisualMerchandiser/css/source/_module.less';

When saving and uploading this file, i get the same error message but for the Magento_Backend module:

Compilation from source: adminhtml/Magento/backend/en_GB/css/styles.less Unable to get content for 'adminhtml/Magento/backend/en_GB/Magento_Backend/css/source/_module.less'

I have a feeling this may be an issues with the permissions? has anyone had this issue before?

0

I see that you are trying to overwrite Magento_Checkout in the backend theme, which is intended for admin.

You must do this overwriting in your current theme.

Your current theme is in /app/design/frontend/PackageName/ThemeName, where you can put the Magento_Checkout folder and the _checkout.less file is in this path /app/design/frontend/PackageName/ThemeName/Magento_Checkout/web/css/source/module/_checkout.less

  • cheers for your answer. while trying to find a solution, i tidied up some of my files. the Magento_Checkout module does not need to be over written. I have updated my question with the current problem – dev Feb 27 '18 at 14:50
  • I think it's a confusion, please tell me what the result you want to have. Do you want the result in the frontend, in the backend (admin)? – St3phan Feb 27 '18 at 23:11
  • The styles.less file is a file for the backend theme (admin) where you can import stylesheet files from all backend modules, and this styles.less the file is compiled and generates the styles.css file. – St3phan Feb 27 '18 at 23:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.