Weird behavior from magento after trying to make mycustomtheme with parent luma.
When I put _extend.less in incorrect location:
app/design/frontend/mevendor/mycustomtheme/css/source (missing web folder before css), the ls/dir output from:
var/view_preprocessed/pub/static/frontend/mevendor/mycustomtheme/en_US contains:
Magento_AdvancedCheckout Magento_GiftCardAccount Magento_Newsletter Magento_Sales Magento_AdvancedSearch Magento_GiftMessage Magento_PageBuilder Magento_SalesRule Magento_Banner Magento_GiftRegistry Magento_Paypal Magento_SendFriend Magento_Bundle Magento_GiftWrapping Magento_ProductVideo Magento_Swatches Magento_Catalog Magento_GroupedProduct Magento_ReCaptchaCheckoutSalesRule Magento_Theme Magento_CatalogEvent Magento_InstantPurchase Magento_ReCaptchaCustomer Magento_Vault Magento_CatalogSearch Magento_InventoryConfigurableProductFrontendUi Magento_ReCaptchaFrontendUi Magento_VersionsCms Magento_Checkout Magento_InventoryInStorePickupFrontend Magento_ReCaptchaNewsletter Magento_Weee Magento_Cms Magento_Invitation Magento_ReCaptchaReview Magento_Wishlist Magento_Contact Magento_LayeredNavigation Magento_ReCaptchaSendFriend PayPal_Braintree Magento_Customer Magento_LoginAsCustomerFrontendUi Magento_Reports css Magento_CustomerBalance Magento_Msrp Magento_Review info.json Magento_Downloadable Magento_MultipleWishlist Magento_Reward js-translation.json Magento_GiftCard Magento_Multishipping Magento_Rma mage
The css/source folder above contains style-l.css and style-m.css. The css on the website is not broken but conceivably the css in _extend.less is not being applied to the produced styling.
Whereas if I put the _extend.less in correct folder location:
app/design/frontend/mevendor/mycustomtheme/web/css/source , the ls/dir output from
var/view_preprocessed/pub/static/frontend/mevendor/mycustomtheme/en_US contains:
Magento_PageBuilder css info.json js-translation.json mage
The css/source folder above does NOT contain style-l.css and style-m.css & as a result everything is broken. The website's homepage only references 1 css file calendar.css and no other css.
In both cases the _extend.less contains the following
body{background-color:yellow;}
I have repeatedly run the following to no avail
rm -rf /home/magento/pub/static/* /home/magento/var/view_preprocessed/* /home/magento/var/cache/* cp /root/.htaccess /home/magento/pub/static/ #re-copying htaccess above to static folder just in case it got lost magento cache:flush magento setup:static-content:deploy -f chown -R www-data:www-data /home/magento chmod -R 777 /home/magento
Why is magento not compiling all the styles when I include _extend.less inside web/css/source for mycustomtheme? But when selecting Magento/luma from admin panel for the frontend everything works just fine. Going crazy trying to solve this for the past week. I have installed different versions of php, mariadb and at one point downgraded from debian 12 to 11 suspecting some internal bug but nothing has worked.
I made a new magento installation in ubuntu 22 and everything is working out of the box! Can anyone at least tell me which php code is responsible for generating the static files
I have looked inside without success:
vendor/magento/framework/App/View/Asset/Publisher.php
vendor/magento/module-deploy/Service/DeployStaticFile.php
vendor/magento/module-deploy/Service/DeployPackage.php
vendor/symfony/console/Application.php
Can anyone plz tell me which class/file is actually responsible for deciding/implementing the less process and finally saving output static files in view_preprocessed